home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / G77.ZIP / !gcc / docs / fortran / g77 (.txt) < prev   
GNU Info File  |  1996-11-11  |  391KB  |  6,964 lines

  1. This is Info file ^.!gcc.docs.fortran.g77, produced by Makeinfo-1.63
  2. from the input file texi.g77.
  3.    This file explains how to use the GNU Fortran system.
  4.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  5. Boston, MA 02111-1307 USA
  6.    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License," "Funding for
  13. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  14. included exactly as in the original, and provided that the entire
  15. resulting derived work is distributed under the terms of a permission
  16. notice identical to this one.
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that the sections entitled "GNU General Public
  20. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  21. `Look And Feel'", and this permission notice, may be included in
  22. translations approved by the Free Software Foundation instead of in the
  23. original English.
  24.    Contributed by James Craig Burley (`burley@gnu.ai.mit.edu').
  25. Inspired by a first pass at translating `g77-0.5.16/f/DOC' that was
  26. contributed to Craig by David Ronis (`ronis@onsager.chem.mcgill.ca').
  27. File: ^.!gcc.docs.fortran.g77,  Node: Top,  Next: Copying,  Up: (DIR)
  28. Introduction
  29. ************
  30.    This manual documents how to run and install the GNU Fortran
  31. compiler, as well as its new features and incompatibilities, and how to
  32. report bugs.  It corresponds to GNU Fortran version 0.5.18.
  33. * Menu:
  34. * Copying::         GNU General Public License says
  35.                     how you can copy and share GNU Fortran.
  36. * Contributors::    People who have contributed to GNU Fortran.
  37. * Funding::         How to help assure continued work for free software.
  38. * Funding GNU Fortran::  How to help assure continued work on GNU Fortran.
  39. * Look and Feel::   Protect your freedom--fight "look and feel".
  40. * Getting Started:: Finding your way around this manual.
  41. * What is GNU Fortran?::  How `g77' fits into the universe.
  42. * G77 and GCC::     You can compile Fortran, C, or other programs.
  43. * Invoking G77::    Command options supported by `g77'.
  44. * News::            News about recent releases of `g77'.
  45. * Changes::         User-visible changes to recent releases of `g77'.
  46. * Language::        The GNU Fortran language.
  47. * Installation::    How to configure, compile and install GNU Fortran.
  48. * Debugging and Interfacing::  How `g77' generates code.
  49. * Collected Fortran Wisdom::  How to avoid Trouble.
  50. * Trouble::         If you have trouble with GNU Fortran.
  51. * Open Questions::  Things we'd like to know.
  52. * Bugs::            How, why, and where to report bugs.
  53. * Service::         How to find suppliers of support for GNU Fortran.
  54. * Index::        Index of concepts and symbol names.
  55. File: ^.!gcc.docs.fortran.g77,  Node: Copying,  Next: Contributors,  Prev: Top,  Up: Top
  56. GNU GENERAL PUBLIC LICENSE
  57. **************************
  58.                          Version 2, June 1991
  59.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  60.      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  61.      
  62.      Everyone is permitted to copy and distribute verbatim copies
  63.      of this license document, but changing it is not allowed.
  64. Preamble
  65. ========
  66.    The licenses for most software are designed to take away your
  67. freedom to share and change it.  By contrast, the GNU General Public
  68. License is intended to guarantee your freedom to share and change free
  69. software--to make sure the software is free for all its users.  This
  70. General Public License applies to most of the Free Software
  71. Foundation's software and to any other program whose authors commit to
  72. using it.  (Some other Free Software Foundation software is covered by
  73. the GNU Library General Public License instead.)  You can apply it to
  74. your programs, too.
  75.    When we speak of free software, we are referring to freedom, not
  76. price.  Our General Public Licenses are designed to make sure that you
  77. have the freedom to distribute copies of free software (and charge for
  78. this service if you wish), that you receive source code or can get it
  79. if you want it, that you can change the software or use pieces of it in
  80. new free programs; and that you know you can do these things.
  81.    To protect your rights, we need to make restrictions that forbid
  82. anyone to deny you these rights or to ask you to surrender the rights.
  83. These restrictions translate to certain responsibilities for you if you
  84. distribute copies of the software, or if you modify it.
  85.    For example, if you distribute copies of such a program, whether
  86. gratis or for a fee, you must give the recipients all the rights that
  87. you have.  You must make sure that they, too, receive or can get the
  88. source code.  And you must show them these terms so they know their
  89. rights.
  90.    We protect your rights with two steps: (1) copyright the software,
  91. and (2) offer you this license which gives you legal permission to copy,
  92. distribute and/or modify the software.
  93.    Also, for each author's protection and ours, we want to make certain
  94. that everyone understands that there is no warranty for this free
  95. software.  If the software is modified by someone else and passed on, we
  96. want its recipients to know that what they have is not the original, so
  97. that any problems introduced by others will not reflect on the original
  98. authors' reputations.
  99.    Finally, any free program is threatened constantly by software
  100. patents.  We wish to avoid the danger that redistributors of a free
  101. program will individually obtain patent licenses, in effect making the
  102. program proprietary.  To prevent this, we have made it clear that any
  103. patent must be licensed for everyone's free use or not licensed at all.
  104.    The precise terms and conditions for copying, distribution and
  105. modification follow.
  106.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  107.   0. This License applies to any program or other work which contains a
  108.      notice placed by the copyright holder saying it may be distributed
  109.      under the terms of this General Public License.  The "Program",
  110.      below, refers to any such program or work, and a "work based on
  111.      the Program" means either the Program or any derivative work under
  112.      copyright law: that is to say, a work containing the Program or a
  113.      portion of it, either verbatim or with modifications and/or
  114.      translated into another language.  (Hereinafter, translation is
  115.      included without limitation in the term "modification".)  Each
  116.      licensee is addressed as "you".
  117.      Activities other than copying, distribution and modification are
  118.      not covered by this License; they are outside its scope.  The act
  119.      of running the Program is not restricted, and the output from the
  120.      Program is covered only if its contents constitute a work based on
  121.      the Program (independent of having been made by running the
  122.      Program).  Whether that is true depends on what the Program does.
  123.   1. You may copy and distribute verbatim copies of the Program's
  124.      source code as you receive it, in any medium, provided that you
  125.      conspicuously and appropriately publish on each copy an appropriate
  126.      copyright notice and disclaimer of warranty; keep intact all the
  127.      notices that refer to this License and to the absence of any
  128.      warranty; and give any other recipients of the Program a copy of
  129.      this License along with the Program.
  130.      You may charge a fee for the physical act of transferring a copy,
  131.      and you may at your option offer warranty protection in exchange
  132.      for a fee.
  133.   2. You may modify your copy or copies of the Program or any portion
  134.      of it, thus forming a work based on the Program, and copy and
  135.      distribute such modifications or work under the terms of Section 1
  136.      above, provided that you also meet all of these conditions:
  137.        a. You must cause the modified files to carry prominent notices
  138.           stating that you changed the files and the date of any change.
  139.        b. You must cause any work that you distribute or publish, that
  140.           in whole or in part contains or is derived from the Program
  141.           or any part thereof, to be licensed as a whole at no charge
  142.           to all third parties under the terms of this License.
  143.        c. If the modified program normally reads commands interactively
  144.           when run, you must cause it, when started running for such
  145.           interactive use in the most ordinary way, to print or display
  146.           an announcement including an appropriate copyright notice and
  147.           a notice that there is no warranty (or else, saying that you
  148.           provide a warranty) and that users may redistribute the
  149.           program under these conditions, and telling the user how to
  150.           view a copy of this License.  (Exception: if the Program
  151.           itself is interactive but does not normally print such an
  152.           announcement, your work based on the Program is not required
  153.           to print an announcement.)
  154.      These requirements apply to the modified work as a whole.  If
  155.      identifiable sections of that work are not derived from the
  156.      Program, and can be reasonably considered independent and separate
  157.      works in themselves, then this License, and its terms, do not
  158.      apply to those sections when you distribute them as separate
  159.      works.  But when you distribute the same sections as part of a
  160.      whole which is a work based on the Program, the distribution of
  161.      the whole must be on the terms of this License, whose permissions
  162.      for other licensees extend to the entire whole, and thus to each
  163.      and every part regardless of who wrote it.
  164.      Thus, it is not the intent of this section to claim rights or
  165.      contest your rights to work written entirely by you; rather, the
  166.      intent is to exercise the right to control the distribution of
  167.      derivative or collective works based on the Program.
  168.      In addition, mere aggregation of another work not based on the
  169.      Program with the Program (or with a work based on the Program) on
  170.      a volume of a storage or distribution medium does not bring the
  171.      other work under the scope of this License.
  172.   3. You may copy and distribute the Program (or a work based on it,
  173.      under Section 2) in object code or executable form under the terms
  174.      of Sections 1 and 2 above provided that you also do one of the
  175.      following:
  176.        a. Accompany it with the complete corresponding machine-readable
  177.           source code, which must be distributed under the terms of
  178.           Sections 1 and 2 above on a medium customarily used for
  179.           software interchange; or,
  180.        b. Accompany it with a written offer, valid for at least three
  181.           years, to give any third party, for a charge no more than your
  182.           cost of physically performing source distribution, a complete
  183.           machine-readable copy of the corresponding source code, to be
  184.           distributed under the terms of Sections 1 and 2 above on a
  185.           medium customarily used for software interchange; or,
  186.        c. Accompany it with the information you received as to the offer
  187.           to distribute corresponding source code.  (This alternative is
  188.           allowed only for noncommercial distribution and only if you
  189.           received the program in object code or executable form with
  190.           such an offer, in accord with Subsection b above.)
  191.      The source code for a work means the preferred form of the work for
  192.      making modifications to it.  For an executable work, complete
  193.      source code means all the source code for all modules it contains,
  194.      plus any associated interface definition files, plus the scripts
  195.      used to control compilation and installation of the executable.
  196.      However, as a special exception, the source code distributed need
  197.      not include anything that is normally distributed (in either
  198.      source or binary form) with the major components (compiler,
  199.      kernel, and so on) of the operating system on which the executable
  200.      runs, unless that component itself accompanies the executable.
  201.      If distribution of executable or object code is made by offering
  202.      access to copy from a designated place, then offering equivalent
  203.      access to copy the source code from the same place counts as
  204.      distribution of the source code, even though third parties are not
  205.      compelled to copy the source along with the object code.
  206.   4. You may not copy, modify, sublicense, or distribute the Program
  207.      except as expressly provided under this License.  Any attempt
  208.      otherwise to copy, modify, sublicense or distribute the Program is
  209.      void, and will automatically terminate your rights under this
  210.      License.  However, parties who have received copies, or rights,
  211.      from you under this License will not have their licenses
  212.      terminated so long as such parties remain in full compliance.
  213.   5. You are not required to accept this License, since you have not
  214.      signed it.  However, nothing else grants you permission to modify
  215.      or distribute the Program or its derivative works.  These actions
  216.      are prohibited by law if you do not accept this License.
  217.      Therefore, by modifying or distributing the Program (or any work
  218.      based on the Program), you indicate your acceptance of this
  219.      License to do so, and all its terms and conditions for copying,
  220.      distributing or modifying the Program or works based on it.
  221.   6. Each time you redistribute the Program (or any work based on the
  222.      Program), the recipient automatically receives a license from the
  223.      original licensor to copy, distribute or modify the Program
  224.      subject to these terms and conditions.  You may not impose any
  225.      further restrictions on the recipients' exercise of the rights
  226.      granted herein.  You are not responsible for enforcing compliance
  227.      by third parties to this License.
  228.   7. If, as a consequence of a court judgment or allegation of patent
  229.      infringement or for any other reason (not limited to patent
  230.      issues), conditions are imposed on you (whether by court order,
  231.      agreement or otherwise) that contradict the conditions of this
  232.      License, they do not excuse you from the conditions of this
  233.      License.  If you cannot distribute so as to satisfy simultaneously
  234.      your obligations under this License and any other pertinent
  235.      obligations, then as a consequence you may not distribute the
  236.      Program at all.  For example, if a patent license would not permit
  237.      royalty-free redistribution of the Program by all those who
  238.      receive copies directly or indirectly through you, then the only
  239.      way you could satisfy both it and this License would be to refrain
  240.      entirely from distribution of the Program.
  241.      If any portion of this section is held invalid or unenforceable
  242.      under any particular circumstance, the balance of the section is
  243.      intended to apply and the section as a whole is intended to apply
  244.      in other circumstances.
  245.      It is not the purpose of this section to induce you to infringe any
  246.      patents or other property right claims or to contest validity of
  247.      any such claims; this section has the sole purpose of protecting
  248.      the integrity of the free software distribution system, which is
  249.      implemented by public license practices.  Many people have made
  250.      generous contributions to the wide range of software distributed
  251.      through that system in reliance on consistent application of that
  252.      system; it is up to the author/donor to decide if he or she is
  253.      willing to distribute software through any other system and a
  254.      licensee cannot impose that choice.
  255.      This section is intended to make thoroughly clear what is believed
  256.      to be a consequence of the rest of this License.
  257.   8. If the distribution and/or use of the Program is restricted in
  258.      certain countries either by patents or by copyrighted interfaces,
  259.      the original copyright holder who places the Program under this
  260.      License may add an explicit geographical distribution limitation
  261.      excluding those countries, so that distribution is permitted only
  262.      in or among countries not thus excluded.  In such case, this
  263.      License incorporates the limitation as if written in the body of
  264.      this License.
  265.   9. The Free Software Foundation may publish revised and/or new
  266.      versions of the General Public License from time to time.  Such
  267.      new versions will be similar in spirit to the present version, but
  268.      may differ in detail to address new problems or concerns.
  269.      Each version is given a distinguishing version number.  If the
  270.      Program specifies a version number of this License which applies
  271.      to it and "any later version", you have the option of following
  272.      the terms and conditions either of that version or of any later
  273.      version published by the Free Software Foundation.  If the Program
  274.      does not specify a version number of this License, you may choose
  275.      any version ever published by the Free Software Foundation.
  276.  10. If you wish to incorporate parts of the Program into other free
  277.      programs whose distribution conditions are different, write to the
  278.      author to ask for permission.  For software which is copyrighted
  279.      by the Free Software Foundation, write to the Free Software
  280.      Foundation; we sometimes make exceptions for this.  Our decision
  281.      will be guided by the two goals of preserving the free status of
  282.      all derivatives of our free software and of promoting the sharing
  283.      and reuse of software generally.
  284.                                 NO WARRANTY
  285.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  286.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  287.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  288.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  289.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  290.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  291.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  292.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  293.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  294.      SERVICING, REPAIR OR CORRECTION.
  295.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  296.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  297.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  298.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  299.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  300.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  301.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  302.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  303.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  304.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  305.                       END OF TERMS AND CONDITIONS
  306. How to Apply These Terms to Your New Programs
  307. =============================================
  308.    If you develop a new program, and you want it to be of the greatest
  309. possible use to the public, the best way to achieve this is to make it
  310. free software which everyone can redistribute and change under these
  311. terms.
  312.    To do so, attach the following notices to the program.  It is safest
  313. to attach them to the start of each source file to most effectively
  314. convey the exclusion of warranty; and each file should have at least
  315. the "copyright" line and a pointer to where the full notice is found.
  316.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  317.      Copyright (C) 19YY  NAME OF AUTHOR
  318.      
  319.      This program is free software; you can redistribute it and/or modify
  320.      it under the terms of the GNU General Public License as published by
  321.      the Free Software Foundation; either version 2 of the License, or
  322.      (at your option) any later version.
  323.      
  324.      This program is distributed in the hope that it will be useful,
  325.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  326.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  327.      GNU General Public License for more details.
  328.      
  329.      You should have received a copy of the GNU General Public License
  330.      along with this program; if not, write to the Free Software
  331.      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  332.    Also add information on how to contact you by electronic and paper
  333. mail.
  334.    If the program is interactive, make it output a short notice like
  335. this when it starts in an interactive mode:
  336.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  337.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  338.      type `show w'.
  339.      This is free software, and you are welcome to redistribute it
  340.      under certain conditions; type `show c' for details.
  341.    The hypothetical commands `show w' and `show c' should show the
  342. appropriate parts of the General Public License.  Of course, the
  343. commands you use may be called something other than `show w' and `show
  344. c'; they could even be mouse-clicks or menu items--whatever suits your
  345. program.
  346.    You should also get your employer (if you work as a programmer) or
  347. your school, if any, to sign a "copyright disclaimer" for the program,
  348. if necessary.  Here is a sample; alter the names:
  349.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  350.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  351.      
  352.      SIGNATURE OF TY COON, 1 April 1989
  353.      Ty Coon, President of Vice
  354.    This General Public License does not permit incorporating your
  355. program into proprietary programs.  If your program is a subroutine
  356. library, you may consider it more useful to permit linking proprietary
  357. applications with the library.  If this is what you want to do, use the
  358. GNU Library General Public License instead of this License.
  359. File: ^.!gcc.docs.fortran.g77,  Node: Contributors,  Next: Funding,  Prev: Copying,  Up: Top
  360. Contributors to GNU Fortran
  361. ***************************
  362.    In addition to James Craig Burley, who wrote the front end, many
  363. people have helped create and improve GNU Fortran.
  364.    * The packaging and compiler portions of GNU Fortran are based
  365.      largely on the GNU CC compiler.  *Note Contributors to GNU CC:
  366.      (gcc)Contributors, for more information.
  367.    * The run-time library used by GNU Fortran is a minor repackaging of
  368.      the `libf2c' library (combined from the `libF77' and `libI77'
  369.      libraries) provided as part of `f2c', available for free from
  370.      `netlib' sites on the Internet.
  371.    * Cygnus Support and The Free Software Foundation contributed
  372.      significant money and/or equipment to Craig's efforts.
  373.    * The following individuals served as alpha testers prior to `g77''s
  374.      public release.  This work consisted of testing, researching,
  375.      sometimes debugging, and occasionally providing small amounts of
  376.      code and fixes for `g77', plus offering plenty of helpful advice
  377.      to Craig:
  378.           Jonathan Corbet
  379.           Dr. Mark Fernyhough
  380.           Takafumi Hayashi (The University of
  381.           AIzu)--`takafumi@u-aizu.ac.jp'
  382.           Kate Hedstrom
  383.           Michel Kern (INRIA and Rice
  384.           University)--`Michel.Kern@inria.fr'
  385.           Dr. A. O. V. Le Blanc
  386.           Dave Love
  387.           Rick Lutowski
  388.           Toon Moene
  389.           Rick Niles
  390.           Derk Reefman
  391.           Wayne K. Schroll
  392.           Bill Thorson
  393.           Pedro A. M. Vazquez
  394.           Ian Watson
  395.    * Scott Snyder (`snyder@d0sgif.fnal.gov') provided the patch to add
  396.      rudimentary support for `INTEGER*1', `INTEGER*2', and `LOGICAL*1'.
  397.      This inspired Craig to add further support, even though the
  398.      resulting support would still be incomplete, because version 0.6
  399.      is still a ways off.
  400.    * David Ronis (`ronis@onsager.chem.mcgill.ca') inspired and
  401.      encouraged Craig to rewrite the documentation in texinfo format by
  402.      contributing a first pass at a translation of the old
  403.      `g77-0.5.16/f/DOC' file.
  404.    * Toon Moene (`toon@moene.indiv.nluug.nl') performed some analysis
  405.      of generated code as part of an overall project to improve `g77'
  406.      code generation to at least be as good as `f2c' used in
  407.      conjunction with `gcc'.  So far, this has resulted in the three,
  408.      somewhat experimental, options added by `g77' to the `gcc'
  409.      compiler and its back end.
  410.    * Many other individuals have helped debug, test, and improve `g77'
  411.      over the past several years, and undoubtedly more people will be
  412.      doing so in the future.  If you have done so, and would like to
  413.      see your name listed in the above list, please ask!  The default
  414.      is that people wish to remain anonymous.
  415. File: ^.!gcc.docs.fortran.g77,  Node: Funding,  Next: Funding GNU Fortran,  Prev: Contributors,  Up: Top
  416. Funding Free Software
  417. *********************
  418.    If you want to have more free software a few years from now, it makes
  419. sense for you to help encourage people to contribute funds for its
  420. development.  The most effective approach known is to encourage
  421. commercial redistributors to donate.
  422.    Users of free software systems can boost the pace of development by
  423. encouraging for-a-fee distributors to donate part of their selling price
  424. to free software developers--the Free Software Foundation, and others.
  425.    The way to convince distributors to do this is to demand it and
  426. expect it from them.  So when you compare distributors, judge them
  427. partly by how much they give to free software development.  Show
  428. distributors they must compete to be the one who gives the most.
  429.    To make this approach work, you must insist on numbers that you can
  430. compare, such as, "We will donate ten dollars to the Frobnitz project
  431. for each disk sold."  Don't be satisfied with a vague promise, such as
  432. "A portion of the profits are donated," since it doesn't give a basis
  433. for comparison.
  434.    Even a precise fraction "of the profits from this disk" is not very
  435. meaningful, since creative accounting and unrelated business decisions
  436. can greatly alter what fraction of the sales price counts as profit.
  437. If the price you pay is $50, ten percent of the profit is probably less
  438. than a dollar; it might be a few cents, or nothing at all.
  439.    Some redistributors do development work themselves.  This is useful
  440. too; but to keep everyone honest, you need to inquire how much they do,
  441. and what kind.  Some kinds of development make much more long-term
  442. difference than others.  For example, maintaining a separate version of
  443. a program contributes very little; maintaining the standard version of a
  444. program for the whole community contributes much.  Easy new ports
  445. contribute little, since someone else would surely do them; difficult
  446. ports such as adding a new CPU to the GNU C compiler contribute more;
  447. major new features or packages contribute the most.
  448.    By establishing the idea that supporting further development is "the
  449. proper thing to do" when distributing free software for a fee, we can
  450. assure a steady flow of resources into making more free software.
  451.      Copyright (C) 1994 Free Software Foundation, Inc.
  452.      Verbatim copying and redistribution of this section is permitted
  453.      without royalty; alteration is not permitted.
  454. File: ^.!gcc.docs.fortran.g77,  Node: Funding GNU Fortran,  Next: Look and Feel,  Prev: Funding,  Up: Top
  455. Funding GNU Fortran
  456. *******************
  457.    Work on GNU Fortran is still being done mostly by its author, James
  458. Craig Burley (`burley@gnu.ai.mit.edu'), who is a volunteer for, not an
  459. employee of, the Free Software Foundation (FSF).  As with other GNU
  460. software, funding is important because it can pay for needed equipment,
  461. personnel, and so on.
  462.    The FSF provides information on the best way to fund ongoing
  463. development of GNU software (such as GNU Fortran) in documents such as
  464. the "GNUS Bulletin".  Email `gnu@prep.ai.mit.edu' for information on
  465. funding the FSF.
  466.    To fund specific GNU Fortran work in particular, the FSF might
  467. provide a means for that, but the FSF does not provide direct funding
  468. to the author of GNU Fortran to continue his work.  The FSF has
  469. employee salary restrictions that can be incompatible with the
  470. financial needs of some volunteers, who therefore choose to remain
  471. volunteers and thus be able to be free to do contract work and
  472. otherwise make their own schedules for doing GNU work.
  473.    Still, funding the FSF at least indirectly benefits work on specific
  474. projects like GNU Fortran because it ensures the continuing operation
  475. of the FSF offices, their workstations, their network connections, and
  476. so on, which are invaluable to volunteers.  (Similarly, hiring Cygnus
  477. Support can help a project like GNU Fortran--Cygnus has been a
  478. long-time donor of equipment usage to the author of GNU Fortran, and
  479. this too has been invaluable--*Note Contributors::.)
  480.    Currently, the only way to directly fund the author of GNU Fortran
  481. in his work on that project is to hire him for the work you want him to
  482. do, or donate money to him.  Several people have done this already,
  483. with the result that he has not needed to immediately find contract
  484. work on a few occasions.  If more people did this, he would be able to
  485. plan on not doing contract work for many months and could thus devote
  486. that time to work on projects (such as the planned changes for
  487. `g77-0.6') that require longer timeframes to complete.  For the latest
  488. information on the status of the author, do `finger -l
  489. burley@gnu.ai.mit.edu', i.e. access `burley''s `.plan' file just as you
  490. would `fortran''s to get `g77' status (except there's no public `ftp'
  491. access to `burley''s `.plan' file--you can email him asking for it).
  492.    Another important way to support work on GNU Fortran is to volunteer
  493. to help out.  Work is needed on documentation, testing, porting to
  494. various machines, and in some cases, coding (although major changes
  495. planned for version 0.6 make it difficult to add manpower to this area).
  496. Email `fortran@gnu.ai.mit.edu' to volunteer for this work.
  497.    *Note Funding Free Software: Funding, for more information.
  498. File: ^.!gcc.docs.fortran.g77,  Node: Look and Feel,  Next: Getting Started,  Prev: Funding GNU Fortran,  Up: Top
  499. Protect Your Freedom--Fight "Look And Feel"
  500. *******************************************
  501.    To preserve the ability to write free software, including
  502. replacements for proprietary software, authors must be free to
  503. replicate the user interface to which users of existing software have
  504. become accustomed.
  505.    *Note Protect Your Freedom--Fight "Look And Feel": (gcc)Look and
  506. Feel, for more information.
  507. File: ^.!gcc.docs.fortran.g77,  Node: Getting Started,  Next: What is GNU Fortran?,  Prev: Look and Feel,  Up: Top
  508. Getting Started
  509. ***************
  510.    If you don't need help getting started reading the portions of this
  511. manual that are most important to you, you should skip this portion of
  512. the manual.
  513.    If you are new to compilers, especially Fortran compilers, or new to
  514. how compilers are structured under UNIX and UNIX-like systems, you'll
  515. want to see *Note What is GNU Fortran?::.
  516.    If you are new to GNU compilers, or have used only one GNU compiler
  517. in the past and not had to delve into how it lets you manage various
  518. versions and configurations of `gcc', you should see *Note G77 and
  519. GCC::.
  520.    Everyone except experienced `g77' users should see *Note Invoking
  521. G77::.
  522.    If you're acquainted with previous versions of `g77', you should see
  523. *Note News::.  Further, if you've actually used previous versions of
  524. `g77', especially if you've written or modified Fortran code to be
  525. compiled by previous versions of `g77', you should see *Note Changes::.
  526.    If you intend to write or otherwise compile code that is not already
  527. strictly conforming ANSI FORTRAN 77--and this is probably everyone--you
  528. should see *Note Language::.
  529.    If you don't already have `g77' installed on your system, you must
  530. see *Note Installation::.
  531.    If you run into trouble getting Fortran code to compile, link, run,
  532. or work properly, you might find answers if you see *Note Debugging and
  533. Interfacing::, see *Note Collected Fortran Wisdom::, and see *Note
  534. Trouble::.  You might also find that the problems you are encountering
  535. are bugs in `g77'--see *Note Bugs::, for information on reporting them,
  536. after reading the other material.
  537.    If you need further help with `g77', or with freely redistributable
  538. software in general, see *Note Service::.
  539.    If you would like to help the `g77' project, see *Note Funding GNU
  540. Fortran::, for information on helping financially, and see *Note
  541. Projects::, for information on helping in other ways.
  542.    If you're generally curious about the future of `g77', see *Note
  543. Projects::.  If you're curious about its past, see *Note Contributors::,
  544. and see *Note Funding GNU Fortran::.
  545.    To see a few of the questions maintainers of `g77' have, and that
  546. you might be able to answer, see *Note Open Questions::.
  547. File: ^.!gcc.docs.fortran.g77,  Node: What is GNU Fortran?,  Next: G77 and GCC,  Prev: Getting Started,  Up: Top
  548. What is GNU Fortran?
  549. ********************
  550.    GNU Fortran, or `g77', is designed initially as a free replacement
  551. for, or alternative to, the UNIX `f77' command.  (Similarly, `gcc' is
  552. designed as a replacement for the UNIX `cc' command.)
  553.    `g77' also is designed to fit in well with the other fine GNU
  554. compilers and tools.
  555.    Sometimes these design goals conflict--in such cases, resolution
  556. often is made in favor of fitting in well with Project GNU.  These
  557. cases are usually identified in the appropriate sections of this manual.
  558.    As compilers, `g77', `gcc', and `f77' share the following
  559. characteristics:
  560.    * They read a user's program, stored in a file and containing
  561.      instructions written in the appropriate language (Fortran, C, and
  562.      so on).  This file contains "source code".
  563.    * They translate the user's program into instructions a computer can
  564.      carry out more quickly than it takes to translate the instructions
  565.      in the first place.  These instructions are called "machine
  566.      code"--code designed to be efficiently translated and processed by
  567.      a machine such as a computer.  Humans usually aren't as good
  568.      writing machine code as they are at writing Fortran or C, because
  569.      it is easy to make tiny mistakes writing machine code.  When
  570.      writing Fortran or C, it is easy to make big mistakes.
  571.    * They provide information in the generated machine code that can
  572.      make it easier to find bugs in the program (using a debugging
  573.      tool, called a "debugger", such as `gdb').
  574.    * They locate and gather machine code already generated to perform
  575.      actions requested by statements in the user's program.  This
  576.      machine code is organized into "libraries" and is located and
  577.      gathered during the "link" phase of the compilation process.
  578.      (Linking often is thought of as a separate step, because it can be
  579.      directly invoked via the `ld' command.  However, the `g77' and
  580.      `gcc' commands, as with most compiler commands, automatically
  581.      perform the linking step by calling on `ld' directly, unless asked
  582.      to not do so by the user.)
  583.    * They attempt to diagnose cases where the user's program contains
  584.      incorrect usages of the language.  The "diagnostics" produced by
  585.      the compiler indicate the problem and the location in the user's
  586.      source file where the problem was first noticed.  The user can use
  587.      this information to locate and fix the problem.  (Sometimes an
  588.      incorrect usage of the language leads to a situation where the
  589.      compiler can no longer make any sense of what follows--while a
  590.      human might be able to--and thus ends up complaining about many
  591.      "problems" it encounters that, in fact, stem from just one
  592.      problem, usually the first one reported.)
  593.    * They attempt to diagnose cases where the user's program contains a
  594.      correct usage of the language, but instructs the computer to do
  595.      something questionable.  These diagnostics often are in the form
  596.      of "warnings", instead of the "errors" that indicate incorrect
  597.      usage of the language.
  598.    How these actions are performed is generally under the control of
  599. the user.  Using command-line options, the user can specify how
  600. persnickety the compiler is to be regarding the program (whether to
  601. diagnose questionable usage of the language), how much time to spend
  602. making the generated machine code run faster, and so on.
  603.    `g77' consists of several components:
  604.    * A modified version of the `gcc' command, which also might be
  605.      installed as the system's `cc' command.  (In many cases, `cc'
  606.      refers to the system's "native" C compiler, which might be a
  607.      non-GNU compiler, or an older version of `gcc' considered more
  608.      stable or that is used to build the operating system kernel.)
  609.    * The `g77' command itself, which also might be installed as the
  610.      system's `f77' command.
  611.    * The `libf2c' run-time library.  This library contains the machine
  612.      code needed to support capabilities of the Fortran language that
  613.      are not directly provided by the machine code generated by the
  614.      `g77' compilation phase.
  615.    * The compiler itself, internally named `f771'.
  616.      Note that `f771' does not generate machine code directly--it
  617.      generates "assembly code" that is a more readable form of machine
  618.      code, leaving the conversion to actual machine code to an
  619.      "assembler", usually named `as'.
  620.    `gcc' is often thought of as "the C compiler" only, but it does more
  621. than that.  Based on command-line options and the names given for files
  622. on the command line, `gcc' determines which actions to perform,
  623. including preprocessing, compiling (in a variety of possible
  624. languages), assembling, and linking.
  625.    For example, the command `gcc foo.c' "drives" the file `foo.c'
  626. through the preprocessor `cpp', then the C compiler (internally named
  627. `cc1'), then the assembler (usually `as'), then the linker (`ld'),
  628. producing an executable program named `a.out' (on UNIX systems).
  629.    As another example, the command `gcc foo.cc' would do much the same
  630. as `gcc foo.c', but instead of using the C compiler named `cc1', `gcc'
  631. would use the C++ compiler (named `cc1plus').
  632.    In a GNU Fortran installation, `gcc' recognizes Fortran source files
  633. by name just like it does C and C++ source files.  It knows to use the
  634. Fortran compiler named `f771', instead of `cc1' or `cc1plus', to
  635. compile Fortran files.
  636.    Non-Fortran-related operation of `gcc' is generally unaffected by
  637. installing the GNU Fortran version of `gcc'.  However, without the
  638. installed version of `gcc' being the GNU Fortran version, `gcc' will
  639. not be able to compile and link Fortran programs--and since `g77' uses
  640. `gcc' to do most of the actual work, neither will `g77'!
  641.    The `g77' command is essentially just a front-end for the `gcc'
  642. command.  Fortran users will normally use `g77' instead of `gcc',
  643. because `g77' knows how to specify the libraries needed to link with
  644. Fortran programs (`libf2c' and `lm').  `g77' can still compile and link
  645. programs and source files written in other languages, just like `gcc'.
  646.    The command `g77 -v' is a quick way to display lots of version
  647. information for the various programs used to compile a typical
  648. preprocessed Fortran source file--this produces much more output than
  649. `gcc -v' currently does.  (It also produces an error message near the
  650. end of the output, a diagnostic from the linker, usually `ld'--you can
  651. safely ignore this error, but do include the entire output with any bug
  652. report you submit.) In the output of this command, the line beginning
  653. `GNU Fortran Front End' identifies the version number of GNU Fortran;
  654. immediately preceding that line is a line identifying the version of
  655. `gcc' with which that version of `g77' was built.
  656.    The `libf2c' library is distributed with GNU Fortran for the
  657. convenience of its users, but is not part of GNU Fortran.  It contains
  658. the procedures needed by Fortran programs while they are running.
  659.    For example, while code generated by `g77' is likely to do
  660. additions, subtractions, and multiplications "in line"--in the actual
  661. compiled code--it is not likely to do trigonometric functions this way.
  662.    Instead, operations like trigonometric functions are compiled by the
  663. `f771' compiler (invoked by `g77' when compiling Fortran code) into
  664. machine code that, when run, calls on functions in `libf2c', so
  665. `libf2c' must be linked with almost every useful program having any
  666. component compiled by GNU Fortran.  (As mentioned above, the `g77'
  667. command takes care of all this for you.)
  668.    The `f771' program represents most of what is unique to GNU Fortran.
  669. While the `libf2c' component is really part of `f2c', a free
  670. Fortran-to-C converter distributed by Bellcore (AT&T), and the `g77'
  671. command is just a small front-end to `gcc', `f771' is a combination of
  672. two rather large chunks of code.
  673.    One chunk is the so-called "GNU Back End", or GBE, which knows how
  674. to generate fast code for a wide variety of processors.  The same GBE
  675. is used by the C, C++, and Fortran compiler programs `cc1', `cc1plus',
  676. and `f771', plus others.  Often the GBE is referred to as the "gcc back
  677. end" or even just "gcc"--in this manual, the term GBE is used whenever
  678. the distinction is important.
  679.    The other chunk of `f771' is the majority of what is unique about
  680. GNU Fortran--the code that knows how to interpret Fortran programs to
  681. determine what they are intending to do, and then communicate that
  682. knowledge to the GBE for actual compilation of those programs.  This
  683. chunk is called the "Fortran Front End" (FFE).  The `cc1' and `cc1plus'
  684. programs have their own front ends, for the C and C++ languages,
  685. respectively.  These fronts ends are responsible for diagnosing
  686. incorrect usage of their respective languages by the programs the
  687. process, and are responsible for most of the warnings about
  688. questionable constructs as well.  (The GBE handles producing some
  689. warnings, like those concerning possible references to undefined
  690. variables.)
  691.    Because so much is shared among the compilers for various languages,
  692. much of the behavior and many of the user-selectable options for these
  693. compilers are similar.  For example, diagnostics (error messages and
  694. warnings) are similar in appearance; command-line options like `-Wall'
  695. have generally similar effects; and the quality of generated code (in
  696. terms of speed and size) is roughly similar (since that work is done by
  697. the shared GBE).
  698. File: ^.!gcc.docs.fortran.g77,  Node: G77 and GCC,  Next: Invoking G77,  Prev: What is GNU Fortran?,  Up: Top
  699. Compile Fortran, C, or Other Programs
  700. *************************************
  701.    A GNU Fortran installation includes a modified version of the `gcc'
  702. command.
  703.    In a non-Fortran installation, `gcc' recognizes C, C++, and
  704. Objective-C source files.
  705.    In a GNU Fortran installation, `gcc' also recognizes Fortran source
  706. files and accepts Fortran-specific command-line options, plus some
  707. command-line options that are designed to cater to Fortran users but
  708. apply to other languages as well.
  709.    *Note Compile C; C++; or Objective-C: (gcc)G++ and GCC, for
  710. information on the way different languages are handled by the GNU CC
  711. compiler (`gcc').
  712.    Also provided as part of GNU Fortran is the `g77' command.  The
  713. `g77' command is designed to make compiling and linking Fortran
  714. programs somewhat easier than when using the `gcc' command for these
  715. tasks.  It does this by analyzing the command line somewhat and
  716. changing it appropriately before submitting it to the `gcc' command.
  717.    Use the `-v' option with `g77' to see what is going on--the first
  718. line of output is the invocation of the `gcc' command.  Use
  719. `--driver=true' to disable actual invocation of `gcc' (this works
  720. because `true' is the name of a UNIX command that simply returns
  721. success status).
  722. File: ^.!gcc.docs.fortran.g77,  Node: Invoking G77,  Next: News,  Prev: G77 and GCC,  Up: Top
  723. GNU Fortran Command Options
  724. ***************************
  725.    The `g77' command supports all the options supported by the `gcc'
  726. command.  *Note GNU CC Command Options: (gcc)Invoking GCC, for
  727. information on the non-Fortran-specific aspects of the `gcc' command
  728. (and, therefore, the `g77' command).
  729.    The `g77' command supports one option not supported by the `gcc'
  730. command:
  731. `--driver=COMMAND'
  732.      Specifies that COMMAND, rather than `gcc', is to be invoked by
  733.      `g77' to do its job.  For example, within the gcc build directory
  734.      after building GNU Fortran (but without having to install it),
  735.      `./g77 --driver=./xgcc foo.f -B./'.
  736.    All other options are supported both by `g77' and by `gcc' as
  737. modified (and reinstalled) by the `g77' distribution.  In some cases,
  738. options have positive and negative forms; the negative form of `-ffoo'
  739. would be `-fno-foo'.  This manual documents only one of these two
  740. forms, whichever one is not the default.
  741. * Menu:
  742. * Option Summary::    Brief list of all `g77' options,
  743.                         without explanations.
  744. * Overall Options::     Controlling the kind of output:
  745.                         an executable, object files, assembler files,
  746.                         or preprocessed source.
  747. * Fortran Dialect Options::  Controlling the variant of Fortran language
  748.                              compiled.
  749. * Warning Options::     How picky should the compiler be?
  750. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  751. * Optimize Options::    How much optimization?
  752. * Preprocessor Options:: Controlling header files and macro definitions.
  753.                          Also, getting dependency information for Make.
  754. * Directory Options::   Where to find header files and libraries.
  755.                         Where to find the compiler executable files.
  756. * Code Gen Options::    Specifying conventions for function calls, data layout
  757.                         and register usage.
  758. * Environment Variables:: Env vars that affect GNU Fortran.
  759. File: ^.!gcc.docs.fortran.g77,  Node: Option Summary,  Next: Overall Options,  Up: Invoking G77
  760. Option Summary
  761. ==============
  762.    Here is a summary of all the options specific to GNU Fortran, grouped
  763. by type.  Explanations are in the following sections.
  764. *Overall Options*
  765.      *Note Options Controlling the Kind of Output: Overall Options.
  766.           --driver  -fversion  -fset-g77-defaults
  767. *Fortran Language Options*
  768.      *Note Options Controlling Fortran Dialect: Fortran Dialect Options.
  769.           -ffree-form  -fno-fixed-form  -ff90  -fvxt-not-f90
  770.           -ff90-not-vxt  -fdollar-ok  -fno-backslash
  771.           -fintrin-case-initcap  -fintrin-case-upper
  772.           -fintrin-case-lower  -fintrin-case-any
  773.           -fmatch-case-initcap  -fmatch-case-upper
  774.           -fmatch-case-lower  -fmatch-case-any
  775.           -fsource-case-upper -fsource-case-lower  -fsource-case-preserve
  776.           -fsymbol-case-initcap  -fsymbol-case-upper
  777.           -fsymbol-case-lower  -fsymbol-case-any
  778.           -fcase-strict-upper  -fcase-strict-lower
  779.           -fcase-initcap  -fcase-upper  -fcase-lower  -fcase-preserve
  780.           -fdcp-intrinsics-delete  -fdcp-intrinsics-hide
  781.           -fdcp-intrinsics-disable  -fdcp-intrinsics-enable
  782.           -ff2c-intrinsics-delete  -ff2c-intrinsics-hide
  783.           -ff2c-intrinsics-disable  -ff2c-intrinsics-enable
  784.           -ff90-intrinsics-delete  -ff90-intrinsics-hide
  785.           -ff90-intrinsics-disable  -ff90-intrinsics-enable
  786.           -fmil-intrinsics-delete  -fmil-intrinsics-hide
  787.           -fmil-intrinsics-disable  -fmil-intrinsics-enable
  788.           -funix-intrinsics-delete  -funix-intrinsics-hide
  789.           -funix-intrinsics-disable  -funix-intrinsics-enable
  790.           -fvxt-intrinsics-delete  -fvxt-intrinsics-hide
  791.           -fvxt-intrinsics-disable  -fvxt-intrinsics-enable
  792.           -ffixed-line-length-N  -ffixed-line-length-none
  793. *Warning Options*
  794.      *Note Options to Request or Suppress Warnings: Warning Options.
  795.           -fsyntax-only  -pedantic  -pedantic-errors  -fpedantic
  796.           -fugly  -fno-ugly-args  -fno-ugly-init  -w  -Wimplicit
  797.           -Wunused  -Wuninitialized  -Wall  -Wsurprising  -Werror
  798.           -W
  799. *Debugging Options*
  800.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  801.           -g
  802. *Optimization Options*
  803.      *Note Options that Control Optimization: Optimize Options.
  804.           -ffloat-store  -fforce-mem  -fforce-addr  -fno-inline
  805.           -ffast-math  -fstrength-reduce  -frerun-cse-after-loop
  806.           -fexpensive-optimizations  -fdelayed-branch
  807.           -fschedule-insns  -fschedule-insn2  -fcaller-saves
  808.           -funroll-loops  -funroll-all-loops
  809.           -fno-move-all-movables  -fno-reduce-all-givs
  810.           -fno-rerun-loop-opt
  811. *Directory Options*
  812.      *Note Options for Directory Search: Directory Options.
  813.           -IDIR  -I-
  814. *Code Generation Options*
  815.      *Note Options for Code Generation Conventions: Code Gen Options.
  816.           -fno-automatic  -finit-local-zero  -fno-f2c
  817.           -ff2c-library  -fno-underscoring  -fno-ident
  818.           -fpcc-struct-return  -freg-struct-return
  819.           -fshort-double  -fno-common  -fpack-struct
  820.           -fzeros
  821. * Menu:
  822. * Overall Options::     Controlling the kind of output:
  823.                         an executable, object files, assembler files,
  824.                         or preprocessed source.
  825. * Fortran Dialect Options::  Controlling the variant of Fortran language
  826.                              compiled.
  827. * Warning Options::     How picky should the compiler be?
  828. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  829. * Optimize Options::    How much optimization?
  830. * Preprocessor Options:: Controlling header files and macro definitions.
  831.                          Also, getting dependency information for Make.
  832. * Directory Options::   Where to find header files and libraries.
  833.                         Where to find the compiler executable files.
  834. * Code Gen Options::    Specifying conventions for function calls, data layout
  835.                         and register usage.
  836. File: ^.!gcc.docs.fortran.g77,  Node: Overall Options,  Next: Fortran Dialect Options,  Prev: Option Summary,  Up: Invoking G77
  837. Options Controlling the Kind of Output
  838. ======================================
  839.    Compilation can involve as many as four stages: preprocessing,
  840. compilation proper, assembly, and linking, always in that order.  The
  841. first three stages apply to an individual source file, and end by
  842. producing an object file; linking combines all the object files (those
  843. newly compiled, and those specified as input) into an executable file.
  844.    For any given input file, the file name suffix determines what kind
  845. of compilation is done.  Suffixes specific to GNU Fortran are listed
  846. below.  *Note gcc: (Using and Porting GNU CC)Overall Options, for
  847. information on suffixes recognized by GNU CC.
  848. `FILE.f'
  849. `FILE.for'
  850.      Fortran source code that should not be preprocessed.
  851. `FILE.F'
  852. `FILE.fpp'
  853.      Fortran source code that must be preprocessed (by the C
  854.      preprocessor `cpp', which is part of GNU CC).
  855.    UNIX users typically use the `FILE.f' and `FILE.F' nomenclature.
  856. Users of other operating systems, especially those that cannot
  857. distinguish upper-case letters from lower-case letters in their file
  858. names, typically use the `FILE.for' and `FILE.fpp' nomenclature.
  859.    Use of the preprocessor `cpp' allows use of C-like constructs such
  860. as `#define' and `#include', but can lead to unexpected, even mistaken,
  861. results due to Fortran's source file format.  It is recommended that
  862. use of the C preprocessor be limited to `#include' and, in conjunction
  863. with `#define', only `#if' and related directives, thus avoiding
  864. in-line macro expansion entirely.  This recommendation applies
  865. especially when using the traditional fixed source form.  With free
  866. source form, fewer unexpected transformations are likely to happen, but
  867. use of Hollerith and things like continued character constants can
  868. nevertheless present problems.
  869.    The following options that affect overall processing are recognized
  870. by the `g77' and `gcc' commands in a GNU Fortran installation:
  871. `--driver=COMMAND'
  872.      This works only when invoking the `g77' command, not when invoking
  873.      the `gcc' command.  *Note GNU Fortran Command Options: Invoking
  874.      G77, for information on this option.
  875. `-fversion'
  876.      Ensure that the `g77'-specific version of the compiler phase is
  877.      reported, if run.  (This is supplied automatically when `-v' or
  878.      `--version' is specified as a command-line option for `g77' or
  879.      `gcc' and when the resulting commands compile Fortran source
  880.      files.)
  881. `-fset-g77-defaults'
  882.      Set up whatever `gcc' options are to apply to Fortran compilations.
  883.      For version 0.5.18, this is equivalent to `-fmove-all-movables
  884.      -freduce-all-givs -frerun-loop-opt'.  (This is supplied
  885.      automatically when compiling Fortran code.  The description of
  886.      this option is here so that users seeing it in the output of, say,
  887.      `g77 -v' understand why it is there.  Also, developers who run
  888.      `f771' directly might want to specify it by hand to get the same
  889.      defaults as they would running `f771' via `g77' or `gcc'.)
  890.    *Note Options Controlling the Kind of Output: (gcc)Overall Options,
  891. for information on more options that control the overall operation of
  892. the `gcc' command (and, by extension, the `g77' command).
  893. File: ^.!gcc.docs.fortran.g77,  Node: Fortran Dialect Options,  Next: Warning Options,  Prev: Overall Options,  Up: Invoking G77
  894. Options Controlling Fortran Dialect
  895. ===================================
  896.    The following options control the dialect of Fortran that the
  897. compiler accepts:
  898. `-ffree-form'
  899. `-fno-fixed-form'
  900.      Specify that the source file is written in free form (introduced
  901.      in Fortran 90) instead of the more-traditional fixed form.
  902. `-ff90'
  903.      Allow certain Fortran-90 constructs.
  904.      This option controls whether certain Fortran 90 constructs are
  905.      recognized.  (Other Fortran 90 constructs might or might not be
  906.      recognized depending on other options such as `-fvxt-not-f90',
  907.      `-ff90-intrinsics-enable', and the current level of support for
  908.      Fortran 90.)
  909.      *Note GNU Fortran Extensions: Extensions, for more information.
  910. `-fvxt-not-f90'
  911. `-ff90-not-vxt'
  912.      Specify whether Fortran 90 or other popular extensions are to be
  913.      assumed for ambiguous constructs.  The default is -fvxt-not-f90.
  914.      For example, with `-ff90-not-vxt', `PRINT *,"double-quoted
  915.      string"' is valid, while with `-fvxt-not-f90', `PRINT *,"2000' is
  916.      valid.
  917.      (There is no way to allow both constructs in the general case,
  918.      since statements like `PRINT *,"2000 !comment?"' would be
  919.      ambiguous.)
  920.      *Note GNU Fortran Dialects: Dialects, for more information.
  921. `-fdollar-ok'
  922.      Allow `$' as a valid character in a symbol name.
  923. `-fno-backslash'
  924.      Specify that `\' is not to be specially interpreted in character
  925.      and Hollerith constants a la C and many UNIX Fortran compilers.
  926.      For example, with `-fbackslash' in effect, `A\nB' specifies three
  927.      characters, with the second one being newline.  With
  928.      `-fno-backslash', it specifies four characters, `A', `\', `n', and
  929.      `B'.
  930.      Note that `g77' implements a fairly general form of backslash
  931.      processing that is incompatible with the narrower forms supported
  932.      by some other compilers.  For example, `'A\003B'' is a
  933.      three-character string in `g77', whereas other compilers that
  934.      support backslash might not support the three-octal-digit form,
  935.      and thus treat that string as longer than three characters.
  936.      *Note Certain Changes We Don't Want to Make: Non-bugs, for
  937.      information on why `-fbackslash' is the default instead of
  938.      `-fno-backslash'.
  939. `-fintrin-case-initcap'
  940. `-fintrin-case-upper'
  941. `-fintrin-case-lower'
  942. `-fintrin-case-any'
  943.      Specify expected case for intrinsic names.  `-fintrin-case-lower'
  944.      is the default.
  945. `-fmatch-case-initcap'
  946. `-fmatch-case-upper'
  947. `-fmatch-case-lower'
  948. `-fmatch-case-any'
  949.      Specify expected case for keywords.  `-fmatch-case-lower' is the
  950.      default.
  951. `-fsource-case-upper'
  952. `-fsource-case-lower'
  953. `-fsource-case-preserve'
  954.      Specify whether source text other than character and Hollerith
  955.      constants is to be translated to uppercase, to lowercase, or
  956.      preserved as is.  `-fsource-case-lower' is the default.
  957. `-fsymbol-case-initcap'
  958. `-fsymbol-case-upper'
  959. `-fsymbol-case-lower'
  960. `-fsymbol-case-any'
  961.      Specify valid cases for user-defined symbol names.
  962.      `-fsymbol-case-any' is the default.
  963. `-fcase-strict-upper'
  964.      Same as `-fintrin-case-upper -fmatch-case-upper
  965.      -fsource-case-preserve -fsymbol-case-upper'.  (Requires all
  966.      pertinent source to be in uppercase.)
  967. `-fcase-strict-lower'
  968.      Same as `-fintrin-case-lower -fmatch-case-lower
  969.      -fsource-case-preserve -fsymbol-case-lower'.  (Requires all
  970.      pertinent source to be in lowercase.)
  971. `-fcase-initcap'
  972.      Same as `-fintrin-case-initcap -fmatch-case-initcap
  973.      -fsource-case-preserve -fsymbol-case-initcap'.  (Requires all
  974.      pertinent source to be in initial capitals, as in `Print
  975.      *,SqRt(Value)'.)
  976. `-fcase-upper'
  977.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-upper
  978.      -fsymbol-case-any'.  (Maps all pertinent source to uppercase.)
  979. `-fcase-lower'
  980.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-lower
  981.      -fsymbol-case-any'.  (Maps all pertinent source to lowercase.)
  982. `-fcase-preserve'
  983.      Same as `-fintrin-case-any -fmatch-case-any -fsource-case-preserve
  984.      -fsymbol-case-any'.  (Preserves all case in user-defined symbols,
  985.      while allowing any-case matching of intrinsics and keywords.  For
  986.      example, `call Foo(i,I)' would pass two *different* variables
  987.      named `i' and `I' to a procedure named `Foo'.)
  988. `-fdcp-intrinsics-delete'
  989. `-fdcp-intrinsics-hide'
  990. `-fdcp-intrinsics-disable'
  991. `-fdcp-intrinsics-enable'
  992.      Specify status of Digital's COMPLEX-related intrinsics.
  993.      `-fdcp-intrinsics-enable' is the default.
  994. `-ff2c-intrinsics-delete'
  995. `-ff2c-intrinsics-hide'
  996. `-ff2c-intrinsics-disable'
  997. `-ff2c-intrinsics-enable'
  998.      Specify status of f2c-specific intrinsics.
  999.      `-ff2c-intrinsics-enable' is the default.
  1000. `-ff90-intrinsics-delete'
  1001. `-ff90-intrinsics-hide'
  1002. `-ff90-intrinsics-disable'
  1003. `-ff90-intrinsics-enable'
  1004.      Specify status of F90-specific intrinsics.
  1005.      `-ff90-intrinsics-delete' is the default.
  1006. `-fmil-intrinsics-delete'
  1007. `-fmil-intrinsics-hide'
  1008. `-fmil-intrinsics-disable'
  1009. `-fmil-intrinsics-enable'
  1010.      Specify status of MIL-STD-1753-specific intrinsics.
  1011.      `-fmil-intrinsics-enable' is the default.
  1012. `-funix-intrinsics-delete'
  1013. `-funix-intrinsics-hide'
  1014. `-funix-intrinsics-disable'
  1015. `-funix-intrinsics-enable'
  1016.      Specify status of UNIX intrinsics.  `-funix-intrinsics-enable' is
  1017.      the default.
  1018.      For example, if your code invokes `FLUSH' as a library function
  1019.      and thus works with other UNIX Fortran compilers or earlier
  1020.      version of `g77', either add the `EXTERNAL FLUSH' statement or,
  1021.      perhaps more convenient for you, compile with the
  1022.      -funix-intrinsics-hide or -funix-intrinsics-delete option.
  1023.      Note that `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are
  1024.      intrinsic subroutines, not functions (since they have side
  1025.      effects), so to get the return values from `SIGNAL' and `SYSTEM',
  1026.      append a final argument specifying an `INTEGER' variable or array
  1027.      element to receive the returned status.  (For example, `CALL
  1028.      SYSTEM('rm foo',ISTAT)'.)
  1029.      `FLUSH()' accepts an optional single `INTEGER' argument, since
  1030.      many Fortran implementations allow or require a unit number.
  1031.      Currently, since `libf2c' does not flush a given unit number, this
  1032.      argument is not used--all units are flushed by `libf2c''s
  1033.      implementation of `FLUSH()'.  Do not depend on this behavior--if
  1034.      you want to flush all units, use `CALL FLUSH' (that is, specify no
  1035.      arguments to `FLUSH').
  1036.      `EXIT()' accepts an optional single `INTEGER' argument.  If
  1037.      omitted, zero is the default (as in `CALL EXIT(0)').  The default
  1038.      might change on configurations where the "normal return status" is
  1039.      not zero, however.  If you want to return a "success" status, it
  1040.      is best to call `EXIT' with no arguments in your code, and let
  1041.      `g77' choose the appropriate default.
  1042. `-fvxt-intrinsics-delete'
  1043. `-fvxt-intrinsics-hide'
  1044. `-fvxt-intrinsics-disable'
  1045. `-fvxt-intrinsics-enable'
  1046.      Specify status of VXT intrinsics.  `-fvxt-intrinsics-delete' is
  1047.      the default.
  1048. `-ffixed-line-length-N'
  1049.      Set column after which characters are ignored in typical fixed-form
  1050.      lines in the source file.
  1051.      Popular values for N include 72 (the standard and the default), 80
  1052.      (card image), and 132 (corresponds to "extended-source" options in
  1053.      some popular compilers).  N may be `none', meaning that the entire
  1054.      line is meaningful and that continued character constants never
  1055.      have implicit spaces appended to them to fill out the line.
  1056.      `-ffixed-line-length-0' means the same thing as
  1057.      `-ffixed-line-length-none'.
  1058. File: ^.!gcc.docs.fortran.g77,  Node: Warning Options,  Next: Debugging Options,  Prev: Fortran Dialect Options,  Up: Invoking G77
  1059. Options to Request or Suppress Warnings
  1060. =======================================
  1061.    Warnings are diagnostic messages that report constructions which are
  1062. not inherently erroneous but which are risky or suggest there might
  1063. have been an error.
  1064.    You can request many specific warnings with options beginning `-W',
  1065. for example `-Wimplicit' to request warnings on implicit declarations.
  1066. Each of these specific warning options also has a negative form
  1067. beginning `-Wno-' to turn off warnings; for example, `-Wno-implicit'.
  1068. This manual lists only one of the two forms, whichever is not the
  1069. default.
  1070.    These options control the amount and kinds of warnings produced by
  1071. GNU Fortran:
  1072. `-fsyntax-only'
  1073.      Check the code for syntax errors, but don't do anything beyond
  1074.      that.
  1075. `-pedantic'
  1076.      Issue warnings for uses of extensions to ANSI FORTRAN 77.
  1077.      `-pedantic' also applies to C-language constructs where they occur
  1078.      in GNU Fortran source files, such as use of `\e' in a character
  1079.      constant within a directive like `#include'.
  1080.      Valid ANSI FORTRAN 77 programs should compile properly with or
  1081.      without this option.  However, without this option, certain GNU
  1082.      extensions and traditional Fortran features are supported as well.
  1083.      With this option, many of them are rejected.
  1084.      Some users try to use `-pedantic' to check programs for strict ANSI
  1085.      conformance.  They soon find that it does not do quite what they
  1086.      want: it finds some non-ANSI practices, but not all--however,
  1087.      improvements to `g77' in this area are welcome.
  1088. `-pedantic-errors'
  1089.      Like `-pedantic', except that errors are produced rather than
  1090.      warnings.
  1091. `-fpedantic'
  1092.      Like `-pedantic', but applies only to Fortran constructs.
  1093. `-fugly'
  1094.      Specify that certain "ugly" constructs are to be quietly accepted.
  1095.      Implies `-fugly-args' and `-fugly-init' as well.
  1096.      For example, with `-fno-ugly', `CALL FOO(,)' means to pass one
  1097.      null argument, whereas with `-fugly', it means to pass two null
  1098.      arguments.
  1099. `-fno-ugly-args'
  1100.      Disallow passing Hollerith and typeless constants as actual
  1101.      arguments (for example, `CALL FOO(4HABCD)').
  1102. `-fno-ugly-init'
  1103.      Disallow use of Hollerith and typeless constants as initial values
  1104.      (in `PARAMETER' and `DATA' statements), and use of character
  1105.      constants to initialize numeric types and vice versa.
  1106.      For example, `DATA I/'F'/, CHRVAR/65/, J/4HABCD/' is disallowed by
  1107.      `-fno-ugly-init'.
  1108.      Inhibit all warning messages.
  1109. `-Wimplicit'
  1110.      Warn whenever a variable, array, or function is implicitly
  1111.      declared.  Has an effect similar to using the `IMPLICIT NONE'
  1112.      statement in every program unit.  (Some Fortran compilers provide
  1113.      this feature by an option named `-u' or `/WARNINGS=DECLARATIONS'.)
  1114. `-Wunused'
  1115.      Warn whenever a variable is unused aside from its declaration.
  1116. `-Wuninitialized'
  1117.      Warn whenever an automatic variable is used without first being
  1118.      initialized.
  1119.      These warnings are possible only in optimizing compilation,
  1120.      because they require data flow information that is computed only
  1121.      when optimizing.  If you don't specify `-O', you simply won't get
  1122.      these warnings.
  1123.      These warnings occur only for variables that are candidates for
  1124.      register allocation.  Therefore, they do not occur for a variable
  1125.      that is declared `volatile', or whose address is taken, or whose
  1126.      size is other than 1, 2, 4 or 8 bytes.  Also, they do not occur for
  1127.      arrays, even when they are in registers.
  1128.      Note that there may be no warning about a variable that is used
  1129.      only to compute a value that itself is never used, because such
  1130.      computations may be deleted by data flow analysis before the
  1131.      warnings are printed.
  1132.      These warnings are made optional because GNU Fortran is not smart
  1133.      enough to see all the reasons why the code might be correct
  1134.      despite appearing to have an error.  Here is one example of how
  1135.      this can happen:
  1136.           SUBROUTINE DISPAT(J)
  1137.           IF (J.EQ.1) I=1
  1138.           IF (J.EQ.2) I=4
  1139.           IF (J.EQ.3) I=5
  1140.           CALL FOO(I)
  1141.           END
  1142.      If the value of `J' is always 1, 2 or 3, then `I' is always
  1143.      initialized, but GNU Fortran doesn't know this.  Here is another
  1144.      common case:
  1145.           SUBROUTINE MAYBE(FLAG)
  1146.           LOGICAL FLAG
  1147.           IF (FLAG) VALUE = 3.14
  1148.           ...
  1149.           IF (FLAG) PRINT *, VALUE
  1150.           END
  1151.      This has no bug because `VALUE' is used only if it is set.
  1152. `-Wall'
  1153.      The `-Wunused' and `-Wuninitialized' options combined.  These are
  1154.      all the options which pertain to usage that we recommend avoiding
  1155.      and that we believe is easy to avoid.  (As more warnings are added
  1156.      to `g77', some might be added to the list enabled by `-Wall'.)
  1157.    The remaining `-W...' options are not implied by `-Wall' because
  1158. they warn about constructions that we consider reasonable to use, on
  1159. occasion, in clean programs.
  1160. `-Wsurprising'
  1161.      Warn about "suspicious" constructs that are interpreted by the
  1162.      compiler in a way that might well be surprising to someone reading
  1163.      the code.  These differences can result in subtle,
  1164.      compiler-dependent (even machine-dependent) behavioral differences.
  1165.      The constructs warned about include:
  1166.         * Expressions having two arithmetic operators in a row, such as
  1167.           `X*-Y'.  Such a construct is nonstandard, and can produce
  1168.           unexpected results in more complicated situations such as
  1169.           `X**-Y*Z'.  `g77', along with many other compilers, interprets
  1170.           this example differently than many programmers, and a few
  1171.           other compilers.  Specifically, `g77' interprets `X**-Y*Z' as
  1172.           `(X**(-Y))*Z', while others might think it should be
  1173.           interpreted as `X**(-(Y*Z))'.
  1174.           A revealing example is the constant expression `2**-2*1.',
  1175.           which `g77' evaluates to .25, while others might evaluate it
  1176.           to 0., the difference being the way precedence affects type
  1177.           promotion.
  1178.           (The `-fpedantic' option also warns about expressions having
  1179.           two arithmetic operators in a row.)
  1180.         * Expressions with a unary minus followed by an operand and then
  1181.           a binary operator other than plus or minus.  For example,
  1182.           `-2**2' produces a warning, because the precedence is
  1183.           `-(2**2)', yielding -4, not `(-2)**2', which yields 4, and
  1184.           which might represent what a programmer expects.  Even cases
  1185.           such as `-I*J' produce warnings, even though, in most
  1186.           configurations and situations, there is no computational
  1187.           difference between the results of the two
  1188.           interpretations--the purpose of this warning is to warn about
  1189.           differing interpretations and encourage a better style of
  1190.           coding, not to identify only those places where bugs might
  1191.           exist in the user's code.
  1192.         * `DO' loops with `DO' variables that are not of integral
  1193.           type--that is, using `REAL' or `DOUBLE PRECISION' variables
  1194.           as loop control variables.  Although such loops can be
  1195.           written to work in the "obvious" way, the way `g77' is
  1196.           required by the Fortran standard to interpret such code is
  1197.           likely to be quite different from the way many programmers
  1198.           expect.  (This is true of all `DO' loops, but the differences
  1199.           are pronounced for non-integral loop control variables.)
  1200.           *Note Loops::, for more information.
  1201. `-Werror'
  1202.      Make all warnings into errors.
  1203.      Turns on "extra warnings" and the `uninitialized' option.  (This
  1204.      might change in future versions of `g77'.)
  1205.      "Extra warnings" are issued for:
  1206.         * Unused parameters to a procedure (when `-Wunused' also is
  1207.           specified).
  1208.         * Overflows involving floating-point constants (not available
  1209.           for certain configurations?).
  1210.    *Note Options to Request or Suppress Warnings: (gcc)Warning Options,
  1211. for information on more options offered by the GBE shared by `g77',
  1212. `gcc', and other GNU compilers.
  1213.    Some of these have no effect when compiling programs written in
  1214. Fortran:
  1215. `-Wcomment'
  1216. `-Wformat'
  1217. `-Wparentheses'
  1218. `-Wswitch'
  1219. `-Wtraditional'
  1220. `-Wshadow'
  1221. `-Wid-clash-LEN'
  1222. `-Wlarger-than-LEN'
  1223. `-Wconversion'
  1224. `-Waggregate-return'
  1225. `-Wredundant-decls'
  1226.      These options all could have some relevant meaning for GNU Fortran
  1227.      programs, but are not yet supported.
  1228. File: ^.!gcc.docs.fortran.g77,  Node: Debugging Options,  Next: Optimize Options,  Prev: Warning Options,  Up: Invoking G77
  1229. Options for Debugging Your Program or GNU Fortran
  1230. =================================================
  1231.    GNU Fortran has various special options that are used for debugging
  1232. either your program or `g77'.
  1233.      Produce debugging information in the operating system's native
  1234.      format (stabs, COFF, XCOFF, or DWARF).  GDB can work with this
  1235.      debugging information.
  1236.      Support for this option in Fortran programs is incomplete.  In
  1237.      particular, names of variables and arrays in common blocks or that
  1238.      are storage-associated via `EQUIVALENCE' are unavailable to the
  1239.      debugger.
  1240.    *Note Options for Debugging Your Program or GNU CC: (gcc)Debugging
  1241. Options, for more information on debugging options.
  1242. File: ^.!gcc.docs.fortran.g77,  Node: Optimize Options,  Next: Preprocessor Options,  Prev: Debugging Options,  Up: Invoking G77
  1243. Options That Control Optimization
  1244. =================================
  1245.    Most Fortran users will want to use no optimization when developing
  1246. and testing programs, and use `-O' or `-O2' when compiling programs for
  1247. late-cycle testing and for production use.
  1248.    The following flags have particular applicability when compiling
  1249. Fortran programs:
  1250. `-ffloat-store'
  1251.      Might help a Fortran program that depends on exact IEEE conformance
  1252.      on some machines, but might slow down a program that doesn't.
  1253. `-fforce-mem'
  1254. `-fforce-addr'
  1255.      Might improve optimization of loops.
  1256. `-fno-inline'
  1257.      Don't compile statement functions inline.  Might reduce the size
  1258.      of a program unit--which might be at expense of some speed (though
  1259.      it should compile faster).  Note that if you are not optimizing,
  1260.      no functions can be expanded inline.
  1261. `-ffast-math'
  1262.      Might allow some programs designed to not be too dependent on IEEE
  1263.      behavior for floating-point to run faster, or die trying.
  1264. `-fstrength-reduce'
  1265.      Might make some loops run faster.
  1266. `-frerun-cse-after-loop'
  1267. `-fexpensive-optimizations'
  1268. `-fdelayed-branch'
  1269. `-fschedule-insns'
  1270. `-fschedule-insns2'
  1271. `-fcaller-saves'
  1272.      Might improve performance on some code.
  1273. `-funroll-loops'
  1274.      Definitely improves performance on some code.
  1275. `-funroll-all-loops'
  1276.      Definitely improves performance on some code.
  1277. `-fno-move-all-movables'
  1278. `-fno-reduce-all-givs'
  1279. `-fno-rerun-loop-opt'
  1280.      Each of these might improve performance on some code.
  1281.      Analysis of Fortran code optimization and the resulting
  1282.      optimizations triggered by the above options were contributed by
  1283.      Toon Moene (`toon@moene.indiv.nluug.nl').
  1284.      Please let us know how use of these options affects the
  1285.      performance of your production code.  We're particularly
  1286.      interested in code that runs faster when these options are
  1287.      *disabled*, and in non-Fortran code that benefits when they are
  1288.      *enabled* via the above `gcc' command-line options.
  1289.    *Note Options That Control Optimization: (gcc)Optimize Options, for
  1290. more information on options to optimize the generated machine code.
  1291. File: ^.!gcc.docs.fortran.g77,  Node: Preprocessor Options,  Next: Directory Options,  Prev: Optimize Options,  Up: Invoking G77
  1292. Options Controlling the Preprocessor
  1293. ====================================
  1294.    These options control the C preprocessor, which is run on each C
  1295. source file before actual compilation.
  1296.    *Note Options Controlling the Preprocessor: (gcc)Preprocessor
  1297. Options, for information on C preprocessor options.
  1298.    Some of these options also affect how `g77' processes the `INCLUDE'
  1299. statement.  Since this statement is processed even when preprocessing
  1300. is not requested, it is not described in this section.  *Note Options
  1301. for Directory Search: Directory Options, for information on how `g77'
  1302. processes the `INCLUDE' statement.
  1303. File: ^.!gcc.docs.fortran.g77,  Node: Directory Options,  Next: Code Gen Options,  Prev: Preprocessor Options,  Up: Invoking G77
  1304. Options for Directory Search
  1305. ============================
  1306.    These options affect how the `cpp' preprocessor searches for files
  1307. specified via the `#include' directive.  Therefore, when compiling
  1308. Fortran programs, they are meaningful when the preproecssor is used.
  1309.    Some of these options also affect how `g77' searches for files
  1310. specified via the `INCLUDE' statement.  These options are:
  1311. `-I-'
  1312. `-IDIR'
  1313.      These affect interpretation of the `INCLUDE' statement (as well as
  1314.      of the `#include' directive of the `cpp' preprocessor).
  1315.      Note that `-IDIR' must be specified *without* any spaces between
  1316.      `-I' and the directory name--that is, `-Ifoo/bar' is valid, but
  1317.      `-I foo/bar' is rejected by the `g77' compiler (though the
  1318.      preprocessor supports the latter form).  Also note that the
  1319.      general behavior of `-I' and `INCLUDE' is pretty much the same as
  1320.      of `-I' with `#include' in the `cpp' preprocessor, with regard to
  1321.      looking for `header.gcc' files and other such things.
  1322.      *Note Options for Directory Search: (gcc)Directory Optoins, for
  1323.      information on the `-I' option.
  1324. File: ^.!gcc.docs.fortran.g77,  Node: Code Gen Options,  Next: Environment Variables,  Prev: Directory Options,  Up: Invoking G77
  1325. Options for Code Generation Conventions
  1326. =======================================
  1327.    These machine-independent options control the interface conventions
  1328. used in code generation.
  1329.    Most of them have both positive and negative forms; the negative form
  1330. of `-ffoo' would be `-fno-foo'.  In the table below, only one of the
  1331. forms is listed--the one which is not the default.  You can figure out
  1332. the other form by either removing `no-' or adding it.
  1333. `-fno-automatic'
  1334.      Treat each program unit as if the `SAVE' statement was specified
  1335.      for every local variable and array referenced in it.  Does not
  1336.      affect common blocks.  (Some Fortran compilers provide this option
  1337.      under the name `-static'.)
  1338. `-finit-local-zero'
  1339.      Specify that variables and arrays that are local to a program unit
  1340.      (not in a common block and not passed as an argument) are to be
  1341.      initialized to binary zeros.
  1342.      Since there is a run-time penalty for initialization of variables
  1343.      that are not given the `SAVE' attribute, it might be a good idea
  1344.      to also use `-fno-automatic' with `-finit-local-zero'.
  1345. `-fno-f2c'
  1346.      Do not generate code designed to be compatible with code generated
  1347.      by `f2c'.
  1348.      This does not affect the generation of code that interfaces with
  1349.      the `libf2c' library.
  1350.      *Caution:* If `-fno-f2c' is used when compiling any source file
  1351.      used in a program, it must be used when compiling *all* Fortran
  1352.      source files used in that program.
  1353. `-ff2c-library'
  1354.      Specify that use of `libf2c' is required.  This is the default for
  1355.      the current version of `g77'.
  1356.      Currently it is not valid to specify `-fno-f2c-library'.  This
  1357.      option is provided so users can specify it in shell scripts that
  1358.      build programs and libraries that require the `libf2c' library,
  1359.      even when being compiled by future versions of `g77' that might
  1360.      otherwise default to generating code for an incompatible library.
  1361. `-fno-underscoring'
  1362.      Do not transform names of entities specified in the Fortran source
  1363.      file by appending underscores to them.
  1364.      With `-funderscoring' in effect, `g77' appends two underscores to
  1365.      names with underscores and one underscore to external names with
  1366.      no underscores.  (`g77' also appends two underscores to internal
  1367.      names with underscores to avoid naming collisions with external
  1368.      names.)
  1369.      This is done to ensure compatibility with code produced by many
  1370.      UNIX Fortran compilers, including `f2c', which perform the same
  1371.      transformations.
  1372.      Use of `-fno-underscoring' is not recommended unless you are
  1373.      experimenting with issues such as integration of (GNU) Fortran into
  1374.      existing system environments (vis-a-vis existing libraries, tools,
  1375.      and so on).
  1376.      For example, with `-funderscoring', and assuming other defaults
  1377.      like `-fcase-lower' and that `j()' and `max_count()' are external
  1378.      functions while `my_var' and `lvar' are local variables, a
  1379.      statement like
  1380.           I = J() + MAX_COUNT (MY_VAR, LVAR)
  1381.      is implemented as something akin to:
  1382.           i = j_() + max_count__(&my_var__, &lvar);
  1383.      With `-fno-underscoring', the same statement is implemented as:
  1384.           i = j() + max_count(&my_var, &lvar);
  1385.      Use of `-fno-underscoring' allows direct specification of
  1386.      user-defined names while debugging and when interfacing
  1387.      `g77'-compiled code with other languages.
  1388.      Note that just because the names match does *not* mean that the
  1389.      interface implemented by `g77' for an external name matches the
  1390.      interface implemented by some other language for that same name.
  1391.      That is, getting code produced by `g77' to link to code produced
  1392.      by some other compiler using this or any other method can be only a
  1393.      small part of the overall solution--getting the code generated by
  1394.      both compilers to agree on issues other than naming can require
  1395.      significant effort, and, unlike naming disagreements, linkers
  1396.      normally cannot detect disagreements in these other areas.
  1397.      Also, note that with `-fno-underscoring', the lack of appended
  1398.      underscores introduces the very real possibility that a
  1399.      user-defined external name will conflict with a name in a system
  1400.      library, which could make finding unresolved-reference bugs quite
  1401.      difficult in some cases--they might occur at program run time, and
  1402.      show up only as buggy behavior at run time.
  1403.      In future versions of `g77', we hope to improve naming and linking
  1404.      issues so that debugging always involves using the names as they
  1405.      appear in the source, even if the names as seen by the linker are
  1406.      mangled to prevent accidental linking between procedures with
  1407.      incompatible interfaces.
  1408. `-fno-second-underscore'
  1409.      Do not append a second underscore to names of entities specified
  1410.      in the Fortran source file.
  1411.      This option has no effect if `-fno-underscoring' is not in effect.
  1412.      Otherwise, with this option, an external name such as `MAX_COUNT'
  1413.      is implemented as a reference to the link-time external symbol
  1414.      `max_count_', instead of `max_count__'.
  1415. `-fno-ident'
  1416.      Ignore the `#ident' directive.
  1417. `-fzeros'
  1418.      Treat initial values of zero as if they were any other value.
  1419.      As of version 0.5.18, `g77' normally treats `DATA' and other
  1420.      statements that are used specify initial values of zero for
  1421.      variables and arrays as if no values were actually specified, in
  1422.      the sense that no diagnostics regarding multiple initializations
  1423.      are produced.
  1424.      This is done to speed up compiling of programs that initialize
  1425.      large arrays to zeros.
  1426.      Use `-fzeros' to revert to the simpler, slower behavior that can
  1427.      catch multiple initializations by keeping track of all
  1428.      initializations, zero or otherwise.
  1429.      *Caution:* Future versions of `g77' might disregard this option
  1430.      (and its negative form, the default) or interpret it somewhat
  1431.      differently.  The interpretation changes will affect only
  1432.      non-standard programs; standard-conforming programs should not be
  1433.      affected.
  1434.    *Note Options for Code Generation Conventions: (gcc)Code Gen
  1435. Options, for information on more options offered by the GBE shared by
  1436. `g77', `gcc', and other GNU compilers.
  1437.    Some of these do *not* work when compiling programs written in
  1438. Fortran:
  1439. `-fpcc-struct-return'
  1440. `-freg-struct-return'
  1441.      You should not use these except strictly the same way as you used
  1442.      them to build the version of `libf2c' with which you will be
  1443.      linking all code compiled by `g77' with the same option.
  1444. `-fshort-double'
  1445.      This probably either has no effect on Fortran programs, or makes
  1446.      them act loopy.
  1447. `-fno-common'
  1448.      Do not use this when compiling Fortran programs, or there will be
  1449.      Trouble.
  1450. `-fpack-struct'
  1451.      This probably will break any calls to the `libf2c' library, at the
  1452.      very least, even if it is built with the same option.
  1453. File: ^.!gcc.docs.fortran.g77,  Node: Environment Variables,  Prev: Code Gen Options,  Up: Invoking G77
  1454. Environment Variables Affecting GNU Fortran
  1455. ===========================================
  1456.    GNU Fortran currently does not make use of any environment variables
  1457. to control its operation above and beyond those that affect the
  1458. operation of `gcc'.
  1459.    *Note Environment Variables Affecting GNU CC: (gcc)Environment
  1460. Variables, for information on environment variables.
  1461. File: ^.!gcc.docs.fortran.g77,  Node: News,  Next: Changes,  Prev: Invoking G77,  Up: Top
  1462. News About GNU Fortran
  1463. **********************
  1464. In 0.5.18:
  1465. ==========
  1466.    * Add some rudimentary support for `INTEGER*1', `INTEGER*2',
  1467.      `INTEGER*8', and their `LOGICAL' equivalents.  (This support works
  1468.      on most, maybe all, `gcc' targets.)
  1469.      Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing
  1470.      the patch for this!
  1471.      Among the missing elements from the support for these features are
  1472.      full intrinsic support and constants.
  1473.    * Add some rudimentary support for the `BYTE' and `WORD'
  1474.      type-declaration statements.  `BYTE' corresponds to `INTEGER*1',
  1475.      while `WORD' corresponds to `INTEGER*2'.
  1476.      Thanks to Scott Snyder (`snyder@d0sgif.fnal.gov') for providing
  1477.      the patch for this!
  1478.    * The compiler code handling intrinsics has been largely rewritten
  1479.      to accommodate the new types.  No new intrinsics or arguments for
  1480.      existing intrinsics have been added, so there is, at this point,
  1481.      no intrinsic to convert to `INTEGER*8', for example.
  1482.    * Support automatic arrays in procedures.
  1483.    * Reduce space/time requirements for handling large *sparsely*
  1484.      initialized aggregate arrays.  This improvement applies to only a
  1485.      subset of the general problem to be addressed in 0.6.
  1486.    * Treat initial values of zero as if they weren't specified (in DATA
  1487.      and type-declaration statements).  The initial values will be set
  1488.      to zero anyway, but the amount of compile time processing them
  1489.      will be reduced, in some cases significantly (though, again, this
  1490.      is only a subset of the general problem to be addressed in 0.6).
  1491.      A new option, `-fzeros', is introduced to enable the traditional
  1492.      treatment of zeros as any other value.
  1493.    * With `-ff90' in force, `g77' incorrectly interpreted `REAL(Z)' as
  1494.      returning a `REAL' result, instead of as a `DOUBLE PRECISION'
  1495.      result.  (Here, `Z' is `DOUBLE COMPLEX'.)
  1496.      With `-fno-f90' in force, the interpretation remains unchanged,
  1497.      since this appears to be how at least some F77 code using the
  1498.      `DOUBLE COMPLEX' extension expected it to work.
  1499.      Essentially, `REAL(Z)' in F90 is the same as `DBLE(Z)', while in
  1500.      extended F77, it appears to be the same as `REAL(REAL(Z))'.
  1501.    * An expression involving exponentiation, where both operands were
  1502.      type `INTEGER' and the right-hand operand was negative, was
  1503.      erroneously evaluated.
  1504.    * Fix bugs involving `DATA' implied-`DO' constructs (these involved
  1505.      an errant diagnostic and a crash, both on good code, one involving
  1506.      subsequent statement-function definition).
  1507.    * Close `INCLUDE' files after processing them, so compiling source
  1508.      files with lots of `INCLUDE' statements does not result in being
  1509.      unable to open `INCLUDE' files after all the available file
  1510.      descriptors are used up.
  1511.    * Speed up compiling, especially of larger programs, and perhaps
  1512.      slightly reduce memory utilization while compiling (this is *not*
  1513.      the improvement planned for 0.6 involving large aggregate
  1514.      areas)--these improvements result from simply turning off some
  1515.      low-level code to do self-checking that hasn't been triggered in a
  1516.      long time.
  1517.    * Introduce three new options that implement optimizations in the
  1518.      `gcc' back end (GBE).  These options are `-fmove-all-movables',
  1519.      `-freduce-all-givs', and `-frerun-loop-opt', which are enabled, by
  1520.      default, for Fortran compilations.  These optimizations are
  1521.      intended to help toon Fortran programs.
  1522.    * Patch the GBE to do a better job optimizing certain kinds of
  1523.      references to array elements.
  1524.    * Due to patches to the GBE, the version number of `gcc' also is
  1525.      patched to make it easier to manage installations, especially
  1526.      useful if it turns out a `g77' change to the GBE has a bug.
  1527.      The `g77'-modified version number is the `gcc' version number with
  1528.      the string `.f.N' appended, where `f' identifies the version as
  1529.      enhanced for Fortran, and N is `1' for the first Fortran patch for
  1530.      that version of `gcc', `2' for the second, and so on.
  1531.      So, this introduces version `2.7.2.f.1' of `gcc'.
  1532.    * Make several improvements and fixes to diagnostics, including the
  1533.      removal of two that were inappropriate or inadequate.
  1534.    * Warning about two successive arithmetic operators, produced by
  1535.      `-Wsurprising', now produced *only* when both operators are,
  1536.      indeed, arithmetic (not relational/boolean).
  1537.    * `-Wsurprising' now warns about the remaining cases of using
  1538.      non-integral variables for implied-`DO' loops, instead of these
  1539.      being rejected unless `-fpedantic' or `-fugly' specified.
  1540.    * Allow `SAVE' of a local variable or array, even after it has been
  1541.      given an initial value via `DATA', for example.
  1542.    * Introduce an Info version of `g77' documentation, which supercedes
  1543.      `gcc/f/CREDITS', `gcc/f/DOC', and `gcc/f/PROJECTS'.  These files
  1544.      will be removed in a future release.  The files `gcc/f/BUGS',
  1545.      `gcc/f/INSTALL', and `gcc/f/NEWS' now are automatically built from
  1546.      the texinfo source when distributions are made.
  1547.      This effort was inspired by a first pass at translating
  1548.      `g77-0.5.16/f/DOC' that was contributed to Craig by David Ronis
  1549.      (`ronis@onsager.chem.mcgill.ca').
  1550.    * New `-fno-second-underscore' option to specify that, when
  1551.      `-funderscoring' is in effect, a second underscore is not to be
  1552.      appended to Fortran names already containing an underscore.
  1553.    * Change the way iterative `DO' loops work to follow the F90
  1554.      standard.  In particular, calculation of the iteration count is
  1555.      still done by converting the start, end, and increment parameters
  1556.      to the type of the `DO' variable, but the result of the
  1557.      calculation is always converted to the default `INTEGER' type.
  1558.      (This should have no effect on existing code compiled by `g77',
  1559.      but code written to assume that use of a *wider* type for the `DO'
  1560.      variable will result in an iteration count being fully calculated
  1561.      using that wider type (wider than default `INTEGER') must be
  1562.      rewritten.)
  1563.    * Upgrade to `libf2c' as of 1996-03-23, and fix up some of the build
  1564.      procedures.
  1565.      Note that the email addresses related to `f2c' have changed--the
  1566.      distribution site now is named `netlib.bell-labs.com', and the
  1567.      maintainer's new address is `dmg@bell-labs.com'.
  1568. In 0.5.17:
  1569. ==========
  1570.    * *Fix serious bug* in `g77 -v' command that can cause removal of a
  1571.      system's `/dev/null' special file if run by user `root'.
  1572.      *All users* of version 0.5.16 should ensure that they have not
  1573.      removed `/dev/null' or replaced it with an ordinary file (e.g. by
  1574.      comparing the output of `ls -l /dev/null' with `ls -l /dev/zero'.
  1575.      If the output isn't basically the same, contact your system
  1576.      administrator about restoring `/dev/null' to its proper status).
  1577.      This bug is particularly insidious because removing `/dev/null' as
  1578.      a special file can go undetected for quite a while, aside from
  1579.      various applications and programs exhibiting sudden, strange
  1580.      behaviors.
  1581.      I sincerely apologize for not realizing the implications of the
  1582.      fact that when `g77 -v' runs the `ld' command with `-o /dev/null'
  1583.      that `ld' tries to *remove* the executable it is supposed to build
  1584.      (especially if it reports unresolved references, which it should
  1585.      in this case)!
  1586.    * Fix crash on `CHARACTER*(*) FOO' in a main or block data program
  1587.      unit.
  1588.    * Fix crash that can occur when diagnostics given outside of any
  1589.      program unit (such as when input file contains `@foo').
  1590.    * Fix crashes, infinite loops (hangs), and such involving diagnosed
  1591.      code.
  1592.    * Fix `ASSIGN''ed variables so they can be `SAVE''d or dummy
  1593.      arguments, and issue clearer error message in cases where target
  1594.      of `ASSIGN' or `ASSIGN'ed `GOTO'/`FORMAT' is too small (which
  1595.      should never happen).
  1596.    * Make `libf2c' build procedures work on more systems again by
  1597.      eliminating unnecessary invocations of `ld -r -x' and `mv'.
  1598.    * Fix omission of `-funix-intrinsics-...' options in list of
  1599.      permitted options to compiler.
  1600.    * Fix failure to always diagnose missing type declaration for
  1601.      `IMPLICIT NONE'.
  1602.    * Fix compile-time performance problem (which could sometimes crash
  1603.      the compiler, cause a hang, or whatever, due to a bug in the back
  1604.      end) involving exponentiation with a large `INTEGER' constant for
  1605.      the right-hand operator (e.g. `I**32767').
  1606.    * Fix build procedures so cross-compiling `g77' (the `fini' utility
  1607.      in particular) is properly built using the host compiler.
  1608.    * Add new `-Wsurprising' option to warn about constructs that are
  1609.      interpreted by the Fortran standard (and `g77') in ways that are
  1610.      surprising to many programmers.
  1611.    * Add `ERF()' and `ERFC()' as generic intrinsics mapping to existing
  1612.      `ERF'/`DERF' and `ERFC'/`DERFC' specific intrinsics.
  1613.      *Note:* You should specify `INTRINSIC ERF,ERFC' in any code where
  1614.      you might use these as generic intrinsics, to improve likelihood
  1615.      of diagnostics (instead of subtle run-time bugs) when using a
  1616.      compiler that doesn't support these as intrinsics (e.g. `f2c').
  1617.    * Remove from `-fno-pedantic' the diagnostic about `DO' with
  1618.      non-`INTEGER' index variable; issue that under `-Wsurprising'
  1619.      instead.
  1620.    * Clarify some diagnostics that say things like "ignored" when that's
  1621.      misleading.
  1622.    * Clarify diagnostic on use of `.EQ.'/`.NE.' on `LOGICAL' operands.
  1623.    * Minor improvements to code generation for various operations on
  1624.      `LOGICAL' operands.
  1625.    * Minor improvement to code generation for some `DO' loops on some
  1626.      machines.
  1627.    * Support `gcc' version 2.7.1.
  1628.    * Upgrade to `libf2c' as of 1995-11-15.
  1629. In 0.5.16:
  1630. ==========
  1631.    * Fix a code-generation bug involving complicated `EQUIVALENCE'
  1632.      statements not involving `COMMON'
  1633.    * Fix code-generation bugs involving invoking "gratis" library
  1634.      procedures in `libf2c' from code compiled with `-fno-f2c' by
  1635.      making these procedures known to `g77' as intrinsics (not affected
  1636.      by -fno-f2c).  This is known to fix code invoking `ERF()',
  1637.      `ERFC()', `DERF()', and `DERFC()'.
  1638.    * Update `libf2c' to include netlib patches through 1995-08-16, and
  1639.      `#define' `WANT_LEAD_0' to 1 to make `g77'-compiled code more
  1640.      consistent with other Fortran implementations by outputting
  1641.      leading zeros in formatted and list-directed output.
  1642.    * Fix a code-generation bug involving adjustable dummy arrays with
  1643.      high bounds whose primaries are changed during procedure
  1644.      execution, and which might well improve code-generation
  1645.      performance for such arrays compared to `f2c' plus `gcc' (but
  1646.      apparently only when using `gcc-2.7.0' or later).
  1647.    * Fix a code-generation bug involving invocation of `COMPLEX' and
  1648.      `DOUBLE COMPLEX' `FUNCTION's and doing `COMPLEX' and `DOUBLE
  1649.      COMPLEX' divides, when the result of the invocation or divide is
  1650.      assigned directly to a variable that overlaps one or more of the
  1651.      arguments to the invocation or divide.
  1652.    * Fix crash by not generating new optimal code for `X**I' if `I' is
  1653.      nonconstant and the expression is used to dimension a dummy array,
  1654.      since the `gcc' back end does not support the necessary mechanics
  1655.      (and the `gcc' front end rejects the equivalent construct, as it
  1656.      turns out).
  1657.    * Fix crash on expressions like `COMPLEX**INTEGER'.
  1658.    * Fix crash on expressions like `(1D0,2D0)**2', i.e. raising a
  1659.      `DOUBLE COMPLEX' constant to an `INTEGER' constant power.
  1660.    * Fix crashes and such involving diagnosed code.
  1661.    * Diagnose, instead of crashing on, statement function definitions
  1662.      having duplicate dummy argument names.
  1663.    * Fix bug causing rejection of good code involving statement function
  1664.      definitions.
  1665.    * Fix bug resulting in debugger not knowing size of local equivalence
  1666.      area when any member of area has initial value (via `DATA', for
  1667.      example).
  1668.    * Fix installation bug that prevented installation of `g77' driver.
  1669.      Provide for easy selection of whether to install copy of `g77' as
  1670.      `f77' to replace the broken code.
  1671.    * Fix `gcc' driver (affects `g77' thereby) to not gratuitously
  1672.      invoke the `f771' program (e.g. when `-E' is specified).
  1673.    * Fix diagnostic to point to correct source line when it immediately
  1674.      follows an `INCLUDE' statement.
  1675.    * Support more compiler options in `gcc'/`g77' when compiling
  1676.      Fortran files.  These options include `-p', `-pg', `-aux-info',
  1677.      `-P', correct setting of version-number macros for preprocessing,
  1678.      full recognition of `-O0', and automatic insertion of
  1679.      configuration-specific linker specs.
  1680.    * Add new intrinsics that interface to existing routines in `libf2c':
  1681.      `ABORT', `DERF', `DERFC', `ERF', `ERFC', `EXIT', `FLUSH',
  1682.      `GETARG', `GETENV', `IARGC', `SIGNAL', and `SYSTEM'.  Note that
  1683.      `ABORT', `EXIT', `FLUSH', `SIGNAL', and `SYSTEM' are intrinsic
  1684.      subroutines, not functions (since they have side effects), so to
  1685.      get the return values from `SIGNAL' and `SYSTEM', append a final
  1686.      argument specifying an `INTEGER' variable or array element (e.g.
  1687.      `CALL SYSTEM('rm foo',ISTAT)').
  1688.    * Add new intrinsic group named `unix' to contain the new intrinsics,
  1689.      and by default enable this new group.
  1690.    * Move `LOC()' intrinsic out of the `vxt' group to the new `unix'
  1691.      group.
  1692.    * Improve `g77' so that `g77 -v' by itself (or with certain other
  1693.      options, including `-B', `-b', `-i', `-nostdlib', and `-V')
  1694.      reports lots more useful version info, and so that long-form
  1695.      options `gcc' accepts are understood by `g77' as well (even in
  1696.      truncated, unambiguous forms).
  1697.    * Add new `g77' option `--driver=name' to specify driver when
  1698.      default, `gcc', isn't appropriate.
  1699.    * Add support for `#' directives (as output by the preprocessor) in
  1700.      the compiler, and enable generation of those directives by the
  1701.      preprocessor (when compiling `.F' files) so diagnostics and
  1702.      debugging info are more useful to users of the preprocessor.
  1703.    * Produce better diagnostics, more like `gcc', with info such as `In
  1704.      function `foo':' and `In file included from...:'.
  1705.    * Support `gcc''s `-fident' and `-fno-ident' options.
  1706.    * When `-Wunused' in effect, don't warn about local variables used as
  1707.      statement-function dummy arguments or `DATA' implied-`DO' iteration
  1708.      variables, even though, strictly speaking, these are not uses of
  1709.      the variables themselves.
  1710.    * When `-W -Wunused' in effect, don't warn about unused dummy
  1711.      arguments at all, since there's no way to turn this off for
  1712.      individual cases (`g77' might someday start warning about
  1713.      these)--applies to `gcc' versions 2.7.0 and later, since earlier
  1714.      versions didn't warn about unused dummy arguments.
  1715.    * New option `-fno-underscoring' that inhibits transformation of
  1716.      names (by appending one or two underscores) so users may experiment
  1717.      with implications of such an environment.
  1718.    * Minor improvement to `gcc/f/info' module to make it easier to build
  1719.      `g77' using the native (non-`gcc') compiler on certain machines
  1720.      (but definitely not all machines nor all non-`gcc' compilers).
  1721.      Please do not report bugs showing problems compilers have with
  1722.      macros defined in `gcc/f/target.h' and used in places like
  1723.      `gcc/f/expr.c'.
  1724.    * Add warning to be printed for each invocation of the compiler if
  1725.      the target machine `INTEGER', REAL, or `LOGICAL' size is not 32
  1726.      bits, since `g77' is known to not work well for such cases (to be
  1727.      fixed in Version 0.6--*note Actual Bugs We Haven't Fixed Yet:
  1728.      Actual Bugs.).
  1729.    * Lots of new documentation (though work is still needed to put it
  1730.      into canonical GNU format).
  1731.    * Build `libf2c' with `-g0', not `-g2', in effect (by default), to
  1732.      produce smaller library without lots of debugging clutter.
  1733. In 0.5.15:
  1734. ==========
  1735.    * Fix bad code generation involving `X**I' and temporary, internal
  1736.      variables generated by `g77' and the back end (such as for `DO'
  1737.      loops).
  1738.    * Fix crash given `CHARACTER A;DATA A/.TRUE./'.
  1739.    * Replace crash with diagnostic given `CHARACTER A;DATA A/1.0/'.
  1740.    * Fix crash or other erratic behavior when null character constant
  1741.      (`''') is encountered.
  1742.    * Fix crash or other erratic behavior involving diagnosed code.
  1743.    * Fix code generation for external functions returning type `REAL'
  1744.      when the `-ff2c' option is in force (which it is by default) so
  1745.      that `f2c' compatibility is indeed provided.
  1746.    * Disallow `COMMON I(10)' if `I' has previously been specified with
  1747.      an array declarator.
  1748.    * New `-ffixed-line-length-N' option, where N is the maximum length
  1749.      of a typical fixed-form line, defaulting to 72 columns, such that
  1750.      characters beyond column N are ignored, or N is `none', meaning no
  1751.      characters are ignored.  does not affect lines with `&' in column
  1752.      1, which are always processed as if `-ffixed-line-length-none' was
  1753.      in effect.
  1754.    * No longer generate better code for some kinds of array references,
  1755.      as `gcc' back end is to be fixed to do this even better, and it
  1756.      turned out to slow down some code in some cases after all.
  1757.    * In `COMMON' and `EQUIVALENCE' areas with any members given initial
  1758.      values (e.g. via `DATA'), uninitialized members now always
  1759.      initialized to binary zeros (though this is not required by the
  1760.      standard, and might not be done in future versions of `g77').
  1761.      Previously, in some `COMMON'/`EQUIVALENCE' areas (essentially
  1762.      those with members of more than one type), the uninitialized
  1763.      members were initialized to spaces, to cater to `CHARACTER' types,
  1764.      but it seems no existing code expects that, while much existing
  1765.      code expects binary zeros.
  1766. In 0.5.14:
  1767. ==========
  1768.    * Don't emit bad code when low bound of adjustable array is
  1769.      nonconstant and thus might vary as an expression at run time.
  1770.    * Emit correct code for calculation of number of trips in `DO' loops
  1771.      for cases where the loop should not execute at all.  (This bug
  1772.      affected cases where the difference between the begin and end
  1773.      values was less than the step count, though probably not for
  1774.      floating-point cases.)
  1775.    * Fix crash when extra parentheses surround item in `DATA'
  1776.      implied-`DO' list.
  1777.    * Fix crash over minor internal inconsistencies in handling
  1778.      diagnostics, just substitute dummy strings where necessary.
  1779.    * Fix crash on some systems when compiling call to `MVBITS()'
  1780.      intrinsic.
  1781.    * Fix crash on array assignment `TYPEDDD(...)=...', where DDD is a
  1782.      string of one or more digits.
  1783.    * Fix crash on `DCMPLX()' with a single `INTEGER' argument.
  1784.    * Fix various crashes involving code with diagnosed errors.
  1785.    * Support `-I' option for `INCLUDE' statement, plus `gcc''s
  1786.      `header.gcc' facility for handling systems like MS-DOS.
  1787.    * Allow `INCLUDE' statement to be continued across multiple lines,
  1788.      even allow it to coexist with other statements on the same line.
  1789.    * Incorporate Bellcore fixes to `libf2c' through 1995-03-15--this
  1790.      fixes a bug involving infinite loops reading EOF with empty
  1791.      list-directed I/O list.
  1792.    * Remove all the `g77'-specific auto-configuration scripts, code,
  1793.      and so on, except for temporary substitutes for bsearch() and
  1794.      strtoul(), as too many configure/build problems were reported in
  1795.      these areas.  People will have to fix their systems' problems
  1796.      themselves, or at least somewhere other than `g77', which expects
  1797.      a working ANSI C environment (and, for now, a GNU C compiler to
  1798.      compile `g77' itself).
  1799.    * Complain if initialized common redeclared as larger in subsequent
  1800.      program unit.
  1801.    * Warn if blank common initialized, since its size can vary and hence
  1802.      related warnings that might be helpful won't be seen.
  1803.    * New `-fbackslash' option, on by default, that causes `\' within
  1804.      `CHARACTER' and Hollerith constants to be interpreted a la GNU C.
  1805.      Note that this behavior is somewhat different from `f2c''s, which
  1806.      supports only a limited subset of backslash (escape) sequences.
  1807.    * Make `-fugly-args' the default.
  1808.    * New `-fugly-init' option, on by default, that allows
  1809.      typeless/Hollerith to be specified as initial values for variables
  1810.      or named constants (`PARAMETER'), and also allows
  1811.      character<->numeric conversion in those contexts--turn off via
  1812.      `-fno-ugly-init'.
  1813.    * New `-finit-local-zero' option to initialize local variables to
  1814.      binary zeros.  This does not affect whether they are `SAVE'd, i.e.
  1815.      made automatic or static.
  1816.    * New `-Wimplicit' option to warn about implicitly typed variables,
  1817.      arrays, and functions.  (Basically causes all program units to
  1818.      default to `IMPLICIT NONE'.)
  1819.    * `-Wall' now implies `-Wuninitialized' as with `gcc' (i.e. unless
  1820.      `-O' not specified, since `-Wuninitialized' requires `-O'), and
  1821.      implies `-Wunused' as well.
  1822.    * `-Wunused' no longer gives spurious messages for unused `EXTERNAL'
  1823.      names (since they are assumed to refer to block data program
  1824.      units, to make use of libraries more reliable).
  1825.    * Support `%LOC()' and `LOC()' of character arguments.
  1826.    * Support null (zero-length) character constants and expressions.
  1827.    * Support `f2c''s `IMAG()' generic intrinsic.
  1828.    * Support `ICHAR()', `IACHAR()', and `LEN()' of character
  1829.      expressions that are valid in assignments but not normally as
  1830.      actual arguments.
  1831.    * Support `f2c'-style `&' in column 1 to mean continuation line.
  1832.    * Allow `NAMELIST', `EXTERNAL', `INTRINSIC', and `VOLATILE' in
  1833.      `BLOCK DATA', even though these are not allowed by the standard.
  1834.    * Allow `RETURN' in main program unit.
  1835.    * Changes to Hollerith-constant support to obey Appendix C of the
  1836.      standard:
  1837.         - Now padded on the right with zeros, not spaces.
  1838.         - Hollerith "format specifications" in the form of arrays of
  1839.           non-character allowed.
  1840.         - Warnings issued when non-blank truncation occurs when
  1841.           converting to another type.
  1842.         - When specified as actual argument, now passed by reference to
  1843.           `INTEGER' (padded on right with spaces if constant too small,
  1844.           otherwise fully intact if constant wider the `INTEGER' type)
  1845.           instead of by value.
  1846.      *Warning:* `f2c' differs on the interpretation of `CALL FOO(1HX)',
  1847.      which it treats exactly the same as `CALL FOO('X')', but which the
  1848.      standard and `g77' treat as `CALL FOO(%REF('X   '))' (padded with
  1849.      as many blanks as necessary to widen to `INTEGER'), essentially.
  1850.    * Changes and fixes to typeless-constant support:
  1851.         - Now treated as a typeless double-length `INTEGER' value.
  1852.         - Warnings issued when overflow occurs.
  1853.         - Padded on the left with zeros when converting to a larger
  1854.           type.
  1855.         - Should be properly aligned and ordered on the target machine
  1856.           for whatever type it is turned into.
  1857.         - When specified as actual argument, now passed as reference to
  1858.           a default `INTEGER' constant.
  1859.    * `%DESCR()' of a non-`CHARACTER' expression now passes a pointer to
  1860.      the expression plus a length for the expression just as if it were
  1861.      a `CHARACTER' expression.  For example, `CALL FOO(%DESCR(D))',
  1862.      where `D' is `REAL*8', is the same as `CALL FOO(D,%VAL(8)))'.
  1863.    * Name of multi-entrypoint master function changed to incorporate
  1864.      the name of the primary entry point instead of a decimal value, so
  1865.      the name of the master function for `SUBROUTINE X' with alternate
  1866.      entry points is now `__g77_masterfun_x'.
  1867.    * Remove redundant message about zero-step-count `DO' loops.
  1868.    * Clean up diagnostic messages, shortening many of them.
  1869.    * Fix typo in `g77' man page.
  1870.    * Clarify implications of constant-handling bugs in `f/BUGS'.
  1871.    * Generate better code for `**' operator with a right-hand operand of
  1872.      type `INTEGER'.
  1873.    * Generate better code for `SQRT()' and `DSQRT()', also when
  1874.      `-ffast-math' specified, enable better code generation for `SIN()'
  1875.      and `COS()'.
  1876.    * Generate better code for some kinds of array references.
  1877.    * Speed up lexing somewhat (this makes the compilation phase
  1878.      noticably faster).
  1879. File: ^.!gcc.docs.fortran.g77,  Node: Changes,  Next: Language,  Prev: News,  Up: Top
  1880. User-visible Changes
  1881. ********************
  1882.    To find out about existing bugs and ongoing plans for GNU Fortran,
  1883. on Internet do `finger -l fortran@gnu.ai.mit.edu' or whatever is the
  1884. equivalent on your system.  (You might need to use the address
  1885. `fortran@gate-1.gnu.ai.mit.edu' instead, or use `gate-2', `gate-3',
  1886. `gate-4', and so on, instead of `gate-1'.)
  1887.    Alternatively, retrieve `gnu.ai.mit.edu:/g77.plan' via anonymous
  1888. ftp, or if you cannot do that, email `fortran@gnu.ai.mit.edu' asking
  1889. for a recent copy of the GNU Fortran `.plan' file.  (The `finger'
  1890. command shown above obtains the most recent copy of all these methods.)
  1891. In 0.5.18:
  1892. ==========
  1893.    * The `BYTE' and `WORD' statements now are supported, to a limited
  1894.      extent.
  1895.    * `INTEGER*1', `INTEGER*2', `INTEGER*8', and their `LOGICAL'
  1896.      equivalents, now are supported to a limited extent.  Among the
  1897.      missing elements are complete intrinsic and constant support.
  1898.    * Support automatic arrays in procedures.  For example, `REAL A(N)',
  1899.      where `A' is not a dummy argument, specifies that `A' is an
  1900.      automatic array.  The size of `A' is calculated from the value of
  1901.      `N' each time the procedure is called, that amount of space is
  1902.      allocated, and that space is freed when the procedure returns to
  1903.      its caller.
  1904.    * Add `-fno-zeros' option, enabled by default, to reduce
  1905.      compile-time CPU and memory usage for code that provides initial
  1906.      zero values for variables and arrays.
  1907.    * Introduce three new options that apply to all compilations by
  1908.      `g77'-aware GNU compilers--`-fmove-all-movables',
  1909.      `-freduce-all-givs', and `-frerun-loop-opt'--which can improve the
  1910.      run-time performance of some programs.
  1911.    * Replace much of the existing documentation with a single Info
  1912.      document.
  1913.    * New option `-fno-second-underscore'.
  1914. In 0.5.17:
  1915. ==========
  1916.    * The `ERF()' and `ERFC()' intrinsics now are generic intrinsics,
  1917.      mapping to `ERF'/`DERF' and `ERFC'/`DERFC', respectively.  *Note:*
  1918.      Use `INTRINSIC ERF,ERFC' in any code that might reference these as
  1919.      generic intrinsics, to improve the likelihood of diagnostics
  1920.      (instead of subtle run-time bugs) when using compilers that don't
  1921.      support these as intrinsics.
  1922.    * New option `-Wsurprising'.
  1923.    * DO loops with non-`INTEGER' variables now diagnosed only when
  1924.      `-Wsurprising' specified.  Previously, this was diagnosed *unless*
  1925.      `-fpedantic' or `-fugly' was specified.
  1926. In 0.5.16:
  1927. ==========
  1928.    * `libf2c' changed to output a leading zero (0) digit for
  1929.      floating-point values output via list-directed and formatted
  1930.      output (to bring `g77' more in line with many existing Fortran
  1931.      implementations--the ANSI FORTRAN 77 standard leaves this choice
  1932.      to the implementation).
  1933.    * `libf2c' no longer built with debugging information intact, making
  1934.      it much smaller.
  1935.    * Automatic installation of the `g77' command now works.
  1936.    * Diagnostic messages now more informative, a la `gcc', including
  1937.      messages like `In function `foo':' and `In file included from...:'.
  1938.    * New group of intrinsics called `unix', including `ABORT', `DERF',
  1939.      `DERFC', `ERF', `ERFC', `EXIT', `FLUSH', `GETARG', `GETENV',
  1940.      `SIGNAL', and `SYSTEM'.
  1941.    * `-funix-intrinsics-{delete,hide,disable,enable}' options added.
  1942.    * `-fno-underscoring' option added.
  1943.    * `--driver' option added to the `g77' command.
  1944.    * Support for the `gcc' options `-fident' and `-fno-ident' added.
  1945.    * `g77 -v' returns much more version info, making the submission of
  1946.      better bug reports easily.
  1947.    * Many improvements to the `g77' command to better fulfill its role
  1948.      as a front-end to the `gcc' driver.  For example, `g77' now
  1949.      recognizes `--version' as a verbose way of specifying `-v'.
  1950.    * Compiling preprocessed (`*.F' and `*.fpp') files now results in
  1951.      better diagnostics and debugging information, as the
  1952.      source-location info now is passed all the way through the
  1953.      compilation process instead of being lost.
  1954. In 0.5.15:
  1955. ==========
  1956.    * `-ffixed-line-length-N' option introduced.
  1957. In 0.5.14:
  1958. ==========
  1959.    * Support for gcc's `-I' option added.
  1960.    * `-fbackslash' option added.
  1961.    * `-fugly-args' option enabled by default (allows `CALL
  1962.      FOO(4HABCD)').
  1963.    * `-fugly-init' option added.
  1964.    * `-finit-local-zero' option added.
  1965.    * Support for the `gcc' option `-Wimplicit' added.
  1966.    * `-Wall' now implies `-Wunused' and, when `-O' is specified,
  1967.      `-Wuninitialized'.
  1968.    * Hollerith constants as actual arguments now are passed by reference
  1969.      instead of by value--so `CALL FOO(4HABCD)' now is compiled exactly
  1970.      the same as `CALL FOO(%REF('ABCD'))', instead of as `CALL
  1971.      FOO(%VAL('ABCD'))'.
  1972.    * Hollerith constants converted to larger types now are padded on the
  1973.      right with spaces.  When converted to smaller types, warnings are
  1974.      issued if non-spaces are truncated on the right.
  1975.    * Format specifications of arrays of types other than `CHARACTER' are
  1976.      allowed in I/O statements, such as when they contain Hollerith
  1977.      data.
  1978.    * Typeless constants as actual arguments now are passed by reference
  1979.      to an `INTEGER' version of the constant instead of by value.
  1980.    * Typeless constants converted to larger types are padded on the left
  1981.      with zeros.  When converted to smaller types, warnings are issued
  1982.      if non-zero bits are truncated on the left.
  1983.    * `%DESCR()' of a non-`CHARACTER' expression treats the expression
  1984.      as if it were `CHARACTER', passing both a pointer to the expression
  1985.      and the length of the type of the expression in bytes, by value,
  1986.      in the "hidden" list of lengths used for `CHARACTER' arguments.
  1987.    * The `ICHAR()', `IACHAR()', and `LEN()' intrinsics now accept
  1988.      character expressions involving concatenation of assumed-length
  1989.      dummy arguments.
  1990.    * Block data program units now may contain `NAMELIST', `EXTERNAL',
  1991.      `INTRINSIC', and `VOLATILE' statements.
  1992.    * Zero-length character expressions now supported.
  1993.    * Support for the `f2c' intrinsic `IMAG()' added.
  1994.    * `INCLUDE' statement restrictions, such as no continuation lines
  1995.      allowed, now lifted.
  1996. File: ^.!gcc.docs.fortran.g77,  Node: Language,  Next: Installation,  Prev: Changes,  Up: Top
  1997. The GNU Fortran Language
  1998. ************************
  1999.    GNU Fortran supports a variety of extensions to, and dialects of,
  2000. the Fortran language.  Its primary base is the ANSI FORTRAN 77 standard.
  2001. It offers some extensions that are popular among users of UNIX `f77'
  2002. and `f2c' compilers, some that are popular among users of other
  2003. compilers (such as Digital products), some that are popular among users
  2004. of the newer Fortran 90 standard, and some that are introduced by GNU
  2005. Fortran.
  2006.    Part of what defines a particular implementation of a Fortran
  2007. system, such as `g77', is the particular characteristics of how it
  2008. supports types, constants, and so on.  Much of this is left up to the
  2009. implementation by the various Fortran standards and accepted practice
  2010. in the industry.
  2011. * Menu:
  2012. * Standard Support:: Degree of support for the ANSI FORTRAN 77 standard.
  2013. * Extensions::       Extensions to GNU Fortran.
  2014. * Types::            Data types.
  2015. * Constants::        Constants and their types.
  2016. * Source Form::      Form of source files (fixed, free, and so on).
  2017. * Pedantic Compilation::  Warnings about non-standard constructs.
  2018. * Case Sensitivity:: Uppercase and lowercase in source files.
  2019. * Intrinsics::       How intrinsics are grouped for easy management.
  2020. * Dialects::         Dialects supported by GNU Fortran.
  2021. * Object Compatibility::  Compatibility issues for code generated by `g77'.
  2022. * Distensions::      Misfeatures supported by GNU Fortran.
  2023. File: ^.!gcc.docs.fortran.g77,  Node: Standard Support,  Next: Extensions,  Up: Language
  2024. ANSI FORTRAN 77 Standard Support
  2025. ================================
  2026.    GNU Fortran supports ANSI FORTRAN 77 with the following caveats:
  2027.    * No passing of an external procedure as an actual argument if the
  2028.      procedure's type is declared `CHARACTER*(*)'.  For example:
  2029.           CHARACTER*(*) CFUNC
  2030.           EXTERNAL CFUNC
  2031.           CALL FOO(CFUNC)
  2032.           END
  2033.      It isn't clear whether the standard considers this conforming.
  2034.      Note that it is unlikely that any production Fortran code tries to
  2035.      use this unsupported construct.
  2036.    * No passing of a dummy procedure as an actual argument if the
  2037.      procedure's type is declared `CHARACTER*(*)'.
  2038.           SUBROUTINE BAR(CFUNC)
  2039.           CHARACTER*(*) CFUNC
  2040.           EXTERNAL CFUNC
  2041.           CALL FOO(CFUNC)
  2042.           END
  2043.      It isn't clear whether the standard considers this conforming.
  2044.      Note that it is unlikely that any production Fortran code tries to
  2045.      use this unsupported construct.
  2046.    * The `DO' variable for an implied-`DO' construct in a `DATA'
  2047.      statement may not be used as the `DO' variable for an outer
  2048.      implied-`DO' construct.  For example, this fragment is disallowed
  2049.      by `g77':
  2050.           DATA ((A(I, I), I= 1, 10), I= 1, 10)/.../
  2051.      This also is disallowed by Fortran 90, as it offers no additional
  2052.      capabilities and would have a variety of possible meanings.
  2053.      Note that it is *very* unlikely that any production Fortran code
  2054.      tries to use this unsupported construct.
  2055.    * An array element initializer in an implied-`DO' construct in a
  2056.      `DATA' statement must contain at least one reference to the `DO'
  2057.      variables of each outer implied-`DO' construct.  For example, this
  2058.      fragment is disallowed by `g77':
  2059.           DATA (A, I= 1, 1)/1./
  2060.      This also is disallowed by Fortran 90, as FORTRAN 77's more
  2061.      permissive requirements offer no additional capabilities.
  2062.      However, `g77' doesn't necessarily diagnose all cases where this
  2063.      requirement is not met.
  2064.      Note that it is *very* unlikely that any production Fortran code
  2065.      tries to use this unsupported construct.
  2066.    In summary, the only ANSI FORTRAN 77 features `g77' doesn't support
  2067. are those that are probably rarely used in actual code, some of which
  2068. are explicitly disallowed by the Fortran 90 standard.
  2069. File: ^.!gcc.docs.fortran.g77,  Node: Extensions,  Next: Types,  Prev: Standard Support,  Up: Language
  2070. GNU Fortran Extensions
  2071. ======================
  2072.    GNU Fortran supports ANSI FORTRAN 77 plus:
  2073.    * `LOC()', if `-funix-intrinsics-enable' is in force.
  2074.    * `%LOC', `%VAL', `%REF', and `%DESCR'--where `%DESCR' currently
  2075.      means the same thing as passing the argument as if it were a
  2076.      `CHARACTER' variable (with the phantom length argument appended to
  2077.      the argument list).
  2078.    * MIL-STD 1753 features (`IAND', `IOR', `MVBITS', `DO WHILE', `END
  2079.      DO', and so on).
  2080.    * `NAMELIST'.
  2081.    * Most `f2c' intrinsics (`AND', `OR', `LSHIFT', `RSHIFT', and so on).
  2082.    * `DOUBLE COMPLEX' and related intrinsics (standard and `f2c'
  2083.      varieties).
  2084.    * Various Fortran 90 features, such as `CYCLE', `EXIT', `SELECT
  2085.      CASE' (except for `CHARACTER' types).
  2086.    * Various DEC VAX/VMS FORTRAN v4.0 features (loosely called VXT
  2087.      extensions).
  2088.    * Various `f2c' features.
  2089.    * Source files that are uppercase-only (enforced), lowercase-only
  2090.      (enforced), caseless, and various other combinations as chosen via
  2091.      command-line options.
  2092.    * Arbitrary (limited only by available memory) number of
  2093.      continuation lines.
  2094.    * Use of `&' in column 1 to indicate a continuation line (as
  2095.      supported by `f2c').
  2096.    * Dollar signs (`$') in identifiers (other than as the first
  2097.      character) when the `-fdollar-ok' option is specified.
  2098.    When `-ff90' is specified, the language dialect changes as follows:
  2099.    * The type of `REAL(Z)', where `Z' is type `DOUBLE COMPLEX', is
  2100.      `DOUBLE PRECISION' instead of `REAL'.
  2101.    * Zero-length `CHARACTER' entities are accepted, even when
  2102.      `-fpedantic' is specified.
  2103.    * Zero-size array dimensions (as in `INTEGER I(10,20,4:2)') are
  2104.      accepted, although these are not supported by `libf2c', so
  2105.      diagnostics are nevertheless produced for `g77'.
  2106.    * `DOUBLE COMPLEX' (explicit or implicit) is accepted, even when
  2107.      `-fpedantic' is specified.
  2108.    * Substrings of constants (as in `'hello'(3:5)') are accepted, even
  2109.      when `-fpedantic' is specified.
  2110.    * `DATA' statements are allowed to precede executable statements,
  2111.      even when `-fpedantic' specified.
  2112.      Note that this does not allow all possible means of specifying
  2113.      further attributes via specification statements for a variable
  2114.      after it has been given an initial value via `DATA' or a
  2115.      type-declaration statement.  For example, after `DATA I/1/',
  2116.      `INTEGER I' is not permitted, but `INTEGER J' is permitted.
  2117.    * Use of a semicolon (`;') as a statement separator is accepted,
  2118.      even when `-fpedantic' specified (so `CALL FOO; CALL BAR' works).
  2119.    * Underscores (`_') are accepted in symbol names (except as the
  2120.      first character, since Fortran 90 provides a different
  2121.      interpretation for certain cases where that would occur--though
  2122.      `g77' does not yet support that interpretation).
  2123. File: ^.!gcc.docs.fortran.g77,  Node: Types,  Next: Constants,  Prev: Extensions,  Up: Language
  2124. Types
  2125. =====
  2126.    Fortran implementations have a fair amount of freedom given them by
  2127. the standard as far as how much storage space is used and how much
  2128. precision is offered by the various types such as `LOGICAL', `INTEGER',
  2129. `REAL', `DOUBLE PRECISION', `COMPLEX', and `CHARACTER'.  Further, many
  2130. compilers offer so-called `*N' notation, but the interpretation of N
  2131. varies across compilers and target architectures.
  2132.    The standard requires that `LOGICAL', `INTEGER', and `REAL' occupy
  2133. the same amount of storage space, and that `COMPLEX' and `DOUBLE
  2134. PRECISION' take twice as much storage space as `REAL'.  Further, it
  2135. requires that `COMPLEX' entities be ordered such that when a `COMPLEX'
  2136. variable is storage-associated (such as via `EQUIVALENCE') with a
  2137. two-element `REAL' array named `R', `R(1)' corresponds to the real
  2138. element and `R(2)' to the imaginary element of the `COMPLEX' variable.
  2139. No particular requirements as to precision of any of these are placed on
  2140. the implementation, nor is the relationship of storage sizes of these
  2141. types to the `CHARACTER' type specified by the standard.
  2142.    `g77' follows the above requirements, warning when compiling a
  2143. program requires placement of items in memory that contradict the
  2144. requirements of the target architecture.  (For example, a program can
  2145. require placement of a `DOUBLE PRECISION' on a boundary that is not an
  2146. even multiple of its size, but still an even multiple of the size of a
  2147. `REAL' variable.  On some target architectures, using the canonical
  2148. mapping of Fortran types to underlying architectural types, such
  2149. placement is prohibited by the machine definition or the Application
  2150. Binary Interface (ABI) in force for the configuration defined for
  2151. building `gcc' and `g77'.  `g77' warns about such situations when it
  2152. encounters them.)
  2153.    `g77' follows consistent rules for configuring the mapping between
  2154. Fortran types, including the `*N' notation, and the underlying
  2155. architectural types as accessed by a similarly-configured applicable
  2156. version of the `gcc' compiler.  These rules offer a widely portable,
  2157. consistent Fortran/C environment, although they might well conflict
  2158. with the expectations of users of Fortran compilers designed and
  2159. written for particular architectures.
  2160.    These rules are based on the configuration that is in force for the
  2161. version of `gcc' built in the same release as `g77' (and which was
  2162. therefore used to build both the `g77' compiler components and the
  2163. `libf2c' run-time library):
  2164. `REAL'
  2165.      Same as `float' type.
  2166. `DOUBLE PRECISION'
  2167.      Same as whatever floating-point type that is twice the size of a
  2168.      `float'--usually, this is a `double'.
  2169. `INTEGER'
  2170.      Same as an integral type that is occupies the same amount of
  2171.      memory storage `float'--usually, this is either an `int' or a
  2172.      `long int'.
  2173. `LOGICAL'
  2174.      Same `gcc' type as `INTEGER'.
  2175. `COMPLEX'
  2176.      Two `REAL' scalars (one for the real part followed by one for the
  2177.      imaginary part).
  2178. `DOUBLE COMPLEX'
  2179.      Two `DOUBLE PRECISION' scalars.
  2180. `NUMERIC-TYPE*N'
  2181.      (Where NUMERIC-TYPE is any type other than `CHARACTER'.) Same as
  2182.      whatever `gcc' type occupies N times the storage space of a `gcc'
  2183.      `char' item.
  2184. `NUMERIC-TYPE(KIND=N)'
  2185.      N=1 corresponds to `REAL', `INTEGER', `LOGICAL', `COMPLEX'.  N=2
  2186.      corresponds to `DOUBLE PRECISION', `DOUBLE COMPLEX', and, for
  2187.      integral types, `char' (usually `INTEGER*1' and `LOGICAL*1').  N=3
  2188.      corresponds to `short' for integral types (usually `INTEGER*2' and
  2189.      `LOGICAL*2').  N=4 corresponds to `long long' for integral types
  2190.      (this usually means `INTEGER*8' and `LOGICAL*8').
  2191.      Note that these are proposed correspondences and might change in
  2192.      future versions of `g77'--avoid writing code depending on them.
  2193.    For now, `g77' does not support numeric types other than the ones
  2194. listed above.  So, on a typical 32-bit machine, only `INTEGER*4',
  2195. `REAL*4', `LOGICAL*4', `COMPLEX*8', and so on, will work.  Other types
  2196. supported by `g77' are derived from gcc types such as `char', `short',
  2197. `int', `long int', `long long int', `long double', and so on.  That is,
  2198. whatever types `gcc' already supports, `g77' probably will support in a
  2199. future version.  The rules for the `NUMERIC-TYPE*N' notation will apply
  2200. to the new types, and new values for `NUMERIC-TYPE(KIND=N)' will be
  2201. assigned in a way that encourages clarity, consistency, and portability.
  2202. File: ^.!gcc.docs.fortran.g77,  Node: Constants,  Next: Source Form,  Prev: Types,  Up: Language
  2203. Constants
  2204. =========
  2205.    `g77' strictly assigns types to all constants not documented as
  2206. "typeless" (the typeless constants include things like `Z'1'').
  2207. Context is never a determining factor for the type, and hence the
  2208. interpretation, of a typed constant.  Examples: `1' is always type
  2209. `INTEGER', `3.141592653545256234' is always type `REAL' (even if the
  2210. additional precision specified is lost, and even when used in a `DOUBLE
  2211. PRECISION' context), `1E0' is always type `REAL', and `1D0' is always
  2212. type `DOUBLE PRECISION'.
  2213.    Many other Fortran compilers attempt to assign types to typed
  2214. constants based on their context.  This results in hard-to-find bugs,
  2215. nonportable code, and is not in the spirit (though it strictly follows
  2216. the letter) of the 77 and 90 standards.  `g77' will not support these
  2217. dangerous semantics, but might offer, in a future release, explicit
  2218. constructs by which a wider variety of typeless constants may be
  2219. specified, and/or user-requested warnings indicating places where `g77'
  2220. might differ from how other compilers assign types to constants.
  2221. File: ^.!gcc.docs.fortran.g77,  Node: Source Form,  Next: Pedantic Compilation,  Prev: Constants,  Up: Language
  2222. Source Form
  2223. ===========
  2224.    The `-ffree-form' (aka `-fno-fixed-form') and `-ffixed-form' (aka
  2225. `-fno-free-form') command-line options govern how the source file is
  2226. interpreted.  Fixed form corresponds to classic ANSI FORTRAN 77 (plus
  2227. popular extensions, such as allowing tabs) and Fortran 90's fixed form.
  2228. Free form corresponds to Fortran 90's free form (though possibly not
  2229. entirely up-to-date, and without complaining about some things that for
  2230. which Fortran 90 requires diagnostics, such as `R = 3 . 1').
  2231.    The way a Fortran compiler views source files depends entirely on the
  2232. implementation choices made for the compiler.  GNU Fortran currently
  2233. tries to be somewhat like a few popular compilers (`f2c', DEC Fortran,
  2234. and so on), though a cleaner default definition along with more
  2235. flexibility offered by command-line options is likely to be offered in
  2236. version 0.6.
  2237.    Here are some facts regarding the way `g77' interprets source lines:
  2238.    * Carriage returns (`\r') in source lines are ignored.  This is
  2239.      somewhat different from `f2c', which seems to treat them as spaces
  2240.      outside character/Hollerith constants, and encodes them as `\r'
  2241.      inside such constants.
  2242.    * A source line with a TAB character anywhere in it is treated as
  2243.      entirely significant--however long it is--instead of ending in
  2244.      column 72 (for fixed-form source) or 132 (for free-form source).
  2245.      This also is different from `f2c', which encodes tabs as `\t' (the
  2246.      ASCII TAB character) inside character and Hollerith constants, but
  2247.      nevertheless seems to treat the column position as if it had been
  2248.      affected by the canonical tab positioning.
  2249.      `g77' effectively translates tabs to the appropriate number of
  2250.      spaces (a la the default for the UNIX `expand' command) before
  2251.      doing any other processing, other than (currently) noting whether
  2252.      a tab was found on a line and using this info to decide how to
  2253.      interpret the length of the line and continued constants.
  2254.      Note that this default behavior probably will change for version
  2255.      0.6, when it will presumably be available via a command-line
  2256.      option.  The default as of version 0.6 is planned to be a "pure
  2257.      visual" model, where tabs are immediately converted to spaces and
  2258.      otherwise have no effect, so the way a typical user sees source
  2259.      lines produces a consistent result no matter how the spacing in
  2260.      those source lines is actually implemented via tabs, spaces, and
  2261.      trailing tabs/spaces before newline.  Command-line options are
  2262.      likely to be added to specify whether all or just-tabbed lines are
  2263.      to be extended to 132 or full input-line length, and perhaps even
  2264.      an option will be added to specify the truncated-line behavior to
  2265.      which some Digital compilers default (and which affects the way
  2266.      continued character/Hollerith constants are interpreted).
  2267.    * Source lines shorter than the applicable fixed length are treated
  2268.      as if they were padded with spaces to that length.
  2269.      This affects only continued character and Hollerith constants, and
  2270.      is a different interpretation than provided by some other popular
  2271.      compilers (although a bit more consistent with the traditional
  2272.      punched-card basis of Fortran and the way the Fortran standard
  2273.      expressed fixed source form).
  2274.      `g77' might someday offer an option to warn about cases where
  2275.      differences might be seen as a result of this treatment, and
  2276.      perhaps an option to specify the alternate behavior as well.
  2277.      Note that this padding cannot apply to lines that are effectively
  2278.      of infinite length--such lines are specified using command-line
  2279.      options like `-ffixed-line-length-none', for example.
  2280. File: ^.!gcc.docs.fortran.g77,  Node: Pedantic Compilation,  Next: Case Sensitivity,  Prev: Source Form,  Up: Language
  2281. Pedantic Compilation
  2282. ====================
  2283.    The `-fpedantic' command-line option specifies that `g77' is to warn
  2284. about certain non-standard constructs.  This is useful for finding some
  2285. extensions `g77' accepts that other compilers might not accept.  (Note
  2286. that the `-pedantic' and `-pedantic-errors' options always imply
  2287. `-fpedantic'.)
  2288.    With `-ff90' in force along with `-fpedantic', some constructs are
  2289. accepted that result in diagnostics when `-fno-f90' and `-fpedantic'
  2290. are both in force.  *Note GNU Fortran Extensions: Extensions, for
  2291. information on those constructs.
  2292.    The constructs for which `g77' issues diagnostics when `-fpedantic'
  2293. and `-fno-f90' are in force are:
  2294.    * Automatic arrays, as in `REAL A(N)', where `A' is not a dummy
  2295.      argument.
  2296.    * `READ (5), I' and `WRITE (10), J'--the standard disallows the
  2297.      comma in each case, while allowing it in `READ 10, I', but many
  2298.      compilers (including `f2c') allow the superfluous comma.
  2299.    * `DOUBLE COMPLEX', either explicitly (via explicit or `IMPLICIT'
  2300.      statement) or implicitly (as in `C*D', where `C' is `COMPLEX' and
  2301.      `D' is `DOUBLE PRECISION', which is prohibited by the standard
  2302.      because it should produce a non-standard `DOUBLE COMPLEX' result).
  2303.    * Automatic conversion of numeric expressions to `INTEGER' in
  2304.      contexts such as:
  2305.         - Array-reference indexes.
  2306.         - Alternate-return values.
  2307.         - Computed `GOTO'.
  2308.         - `FORMAT' run-time expressions (not yet supported).
  2309.         - Dimension lists in specification statements.
  2310.         - Numbers for I/O statements (such as `READ (UNIT=3.2), I')
  2311.         - Sizes of `CHARACTER' entities in specification statements.
  2312.         - Kind types in specification entities (a Fortran 90 feature).
  2313.         - Initial, terminal, and incrementation parameters for
  2314.           implied-`DO' constructs in `DATA' statements.
  2315.    * Automatic conversion of `LOGICAL' expressions to `INTEGER' in
  2316.      contexts such as arithmetic `IF' (where `COMPLEX' expressions are
  2317.      disallowed anyway).
  2318.    * Substring operators applied to character constants and named
  2319.      constants (such as `PRINT *,'hello'(3:5)', which would print
  2320.      `llo').
  2321.    * Null argument passed to statement function (as in `PRINT
  2322.      *,FOO(,3)').
  2323.    * Differences between program units regarding whether a given
  2324.      `COMMON' area is `SAVE'd (for targets where program units in a
  2325.      single source file are "glued" together as they typically are for
  2326.      UNIX development environments).
  2327.    * Differences between named-`COMMON'-block sizes between program
  2328.      units.
  2329.    * Specification statements following first `DATA' statement (normally
  2330.      `DATA I/1/' may be followed by `INTEGER J', though not `INTEGER
  2331.      I', but `-fpedantic' disables use of both cases.
  2332.    * Semicolon as statement separator (as in `CALL FOO; CALL BAR').
  2333.    * Use of `&' in column 1 of fixed-form source (indicates
  2334.      continuation).
  2335.    * Use of `CHARACTER' constants to initialize numeric entities, and
  2336.      vice versa.
  2337.    * Expressions having two arithmetic operators in a row, such as
  2338.      `X*-Y'.
  2339.    If `-fpedantic' is specified along with `-ff90', the following
  2340. constructs result in diagnostics:
  2341.    * Use of semicolons on line with INCLUDE statement.
  2342. File: ^.!gcc.docs.fortran.g77,  Node: Case Sensitivity,  Next: Intrinsics,  Prev: Pedantic Compilation,  Up: Language
  2343. Case Sensitivity
  2344. ================
  2345.    GNU Fortran offers the programmer way too much flexibility in
  2346. deciding how source files are to be treated vis-a-vis uppercase and
  2347. lowercase characters.  There are 66 useful settings that affect case
  2348. sensitivity, plus 10 settings that are nearly useless, with the
  2349. remaining 116 settings being either redundant or useless.
  2350.    None of these settings have any effect on the contents of comments
  2351. (the text after a `c' or `C' in Column 1, for example) or of character
  2352. or Hollerith constants.  Note that things like the `E' in the statement
  2353. `CALL FOO(3.2E10)' and the `TO' in `ASSIGN 10 TO LAB' are considered
  2354. built-in keywords.
  2355.    Low-level switches are identified in this discussion thusly:
  2356.      A Source Case Conversion
  2357.           0 Preserve (see Note 1)
  2358.           1 Convert to Upper Case
  2359.           2 Convert to Lower Case
  2360.      B Built-in Keyword Matching:
  2361.           0 Match Any Case (per-character basis)
  2362.           1 Match Upper Case Only
  2363.           2 Match Lower Case Only
  2364.           3 Match InitialCaps Only (see tables for spellings)
  2365.      C Built-in Intrinsic Matching:
  2366.           0 Match Any Case (per-character basis)
  2367.           1 Match Upper Case Only
  2368.           2 Match Lower Case Only
  2369.           3 Match InitialCaps Only (see tables for spellings)
  2370.      D User-defined Symbol Possibilities (warnings only)
  2371.           0 Allow Any Case (per-character basis)
  2372.           1 Allow Upper Case Only
  2373.           2 Allow Lower Case Only
  2374.           3 Allow InitialCaps Only (see Note 2)
  2375.    Note 1: `g77' eventually will support `NAMELIST' in a manner that is
  2376. consistent with these source switches--in the sense that input will be
  2377. expected to meet the same requirements as source code in terms of
  2378. matching symbol names and keywords (for the exponent letters).
  2379.    Currently, however, `NAMELIST' is supported `libf2c', which
  2380. uppercases `NAMELIST' input and symbol names for matching.  This means
  2381. not only that `NAMELIST' output currently shows symbol (and keyword)
  2382. names in uppercase even if lower-case source conversion (option A2) is
  2383. selected, but that `NAMELIST' cannot be adequately supported when
  2384. source case preservation (option A0) is selected.
  2385.    If A0 is selected, a warning message will be output for each
  2386. `NAMELIST' statement to this effect.  The behavior of the program is
  2387. undefined at run time if two or more symbol names appear in a given
  2388. `NAMELIST' such that the names are identical when converted to upper
  2389. case (e.g. `NAMELIST /X/ VAR, Var, var').  For complete and total
  2390. elegance, perhaps there should be a warning when option A2 is selected,
  2391. since the output of NAMELIST is currently in uppercase but will someday
  2392. be lowercase (when a `libg77' is written), but that seems to be
  2393. overkill for a product in beta test.
  2394.    Note 2: Rules for InitialCaps names are:
  2395.    - Must be a single uppercase letter, *or*
  2396.    - Must start with an uppercase letter and contain at least one
  2397.      lowercase letter.
  2398.    So `A', `Ab', `ABc', `AbC', and `Abc' are valid InitialCaps names,
  2399. but `AB', `A2', and `ABC' are not.  Note that most, but not all,
  2400. built-in names meet these requirements--the exceptions are some of the
  2401. two-letter format specifiers, such as `BN' and `BZ'.
  2402.    Here are the names of the corresponding command-line options:
  2403.      A0: -fsource-case-preserve
  2404.      A1: -fsource-case-upper
  2405.      A2: -fsource-case-lower
  2406.      
  2407.      B0: -fmatch-case-any
  2408.      B1: -fmatch-case-upper
  2409.      B2: -fmatch-case-lower
  2410.      B3: -fmatch-case-initcap
  2411.      
  2412.      C0: -fintrin-case-any
  2413.      C1: -fintrin-case-upper
  2414.      C2: -fintrin-case-lower
  2415.      C3: -fintrin-case-initcap
  2416.      
  2417.      D0: -fsymbol-case-any
  2418.      D1: -fsymbol-case-upper
  2419.      D2: -fsymbol-case-lower
  2420.      D3: -fsymbol-case-initcap
  2421.    Useful combinations of the above settings, along with abbreviated
  2422. option names that set some of these combinations all at once:
  2423.       1: A0--  B0---  C0---  D0---    -fcase-preserve
  2424.       2: A0--  B0---  C0---  D-1--
  2425.       3: A0--  B0---  C0---  D--2-
  2426.       4: A0--  B0---  C0---  D---3
  2427.       5: A0--  B0---  C-1--  D0---
  2428.       6: A0--  B0---  C-1--  D-1--
  2429.       7: A0--  B0---  C-1--  D--2-
  2430.       8: A0--  B0---  C-1--  D---3
  2431.       9: A0--  B0---  C--2-  D0---
  2432.      10: A0--  B0---  C--2-  D-1--
  2433.      11: A0--  B0---  C--2-  D--2-
  2434.      12: A0--  B0---  C--2-  D---3
  2435.      13: A0--  B0---  C---3  D0---
  2436.      14: A0--  B0---  C---3  D-1--
  2437.      15: A0--  B0---  C---3  D--2-
  2438.      16: A0--  B0---  C---3  D---3
  2439.      17: A0--  B-1--  C0---  D0---
  2440.      18: A0--  B-1--  C0---  D-1--
  2441.      19: A0--  B-1--  C0---  D--2-
  2442.      20: A0--  B-1--  C0---  D---3
  2443.      21: A0--  B-1--  C-1--  D0---
  2444.      22: A0--  B-1--  C-1--  D-1--    -fcase-strict-upper
  2445.      23: A0--  B-1--  C-1--  D--2-
  2446.      24: A0--  B-1--  C-1--  D---3
  2447.      25: A0--  B-1--  C--2-  D0---
  2448.      26: A0--  B-1--  C--2-  D-1--
  2449.      27: A0--  B-1--  C--2-  D--2-
  2450.      28: A0--  B-1--  C--2-  D---3
  2451.      29: A0--  B-1--  C---3  D0---
  2452.      30: A0--  B-1--  C---3  D-1--
  2453.      31: A0--  B-1--  C---3  D--2-
  2454.      32: A0--  B-1--  C---3  D---3
  2455.      33: A0--  B--2-  C0---  D0---
  2456.      34: A0--  B--2-  C0---  D-1--
  2457.      35: A0--  B--2-  C0---  D--2-
  2458.      36: A0--  B--2-  C0---  D---3
  2459.      37: A0--  B--2-  C-1--  D0---
  2460.      38: A0--  B--2-  C-1--  D-1--
  2461.      39: A0--  B--2-  C-1--  D--2-
  2462.      40: A0--  B--2-  C-1--  D---3
  2463.      41: A0--  B--2-  C--2-  D0---
  2464.      42: A0--  B--2-  C--2-  D-1--
  2465.      43: A0--  B--2-  C--2-  D--2-    -fcase-strict-lower
  2466.      44: A0--  B--2-  C--2-  D---3
  2467.      45: A0--  B--2-  C---3  D0---
  2468.      46: A0--  B--2-  C---3  D-1--
  2469.      47: A0--  B--2-  C---3  D--2-
  2470.      48: A0--  B--2-  C---3  D---3
  2471.      49: A0--  B---3  C0---  D0---
  2472.      50: A0--  B---3  C0---  D-1--
  2473.      51: A0--  B---3  C0---  D--2-
  2474.      52: A0--  B---3  C0---  D---3
  2475.      53: A0--  B---3  C-1--  D0---
  2476.      54: A0--  B---3  C-1--  D-1--
  2477.      55: A0--  B---3  C-1--  D--2-
  2478.      56: A0--  B---3  C-1--  D---3
  2479.      57: A0--  B---3  C--2-  D0---
  2480.      58: A0--  B---3  C--2-  D-1--
  2481.      59: A0--  B---3  C--2-  D--2-
  2482.      60: A0--  B---3  C--2-  D---3
  2483.      61: A0--  B---3  C---3  D0---
  2484.      62: A0--  B---3  C---3  D-1--
  2485.      63: A0--  B---3  C---3  D--2-
  2486.      64: A0--  B---3  C---3  D---3    -fcase-initcap
  2487.      65: A-1-  B01--  C01--  D01--    -fcase-upper
  2488.      66: A--2  B0-2-  C0-2-  D0-2-    -fcase-lower
  2489.    Number 22 is the "strict" ANSI FORTRAN 77 model wherein all input
  2490. (except comments, character constants, and Hollerith strings) must be
  2491. entered in uppercase.  Use `-fcase-strict-upper' to specify this
  2492. combination.
  2493.    Number 43 is like Number 22 except all input must be lowercase.  Use
  2494. `-fcase-strict-lower' to specify this combination.
  2495.    Number 65 is the "classic" ANSI FORTRAN 77 model as implemented on
  2496. many non-UNIX machines whereby all the source is translated to
  2497. uppercase.  Use `-fcase-upper' to specify this combination.
  2498.    Number 66 is the "canonical" UNIX model whereby all the source is
  2499. translated to lowercase.  Use `-fcase-lower' to specify this
  2500. combination.
  2501.    There are a few nearly useless combinations:
  2502.      67: A-1-  B01--  C01--  D--2-
  2503.      68: A-1-  B01--  C01--  D---3
  2504.      69: A-1-  B01--  C--23  D01--
  2505.      70: A-1-  B01--  C--23  D--2-
  2506.      71: A-1-  B01--  C--23  D---3
  2507.      72: A--2  B01--  C0-2-  D-1--
  2508.      73: A--2  B01--  C0-2-  D---3
  2509.      74: A--2  B01--  C-1-3  D0-2-
  2510.      75: A--2  B01--  C-1-3  D-1--
  2511.      76: A--2  B01--  C-1-3  D---3
  2512.    The above allow some programs to be compiled but with restrictions
  2513. that make most useful programs impossible: Numbers 67 and 72 warn about
  2514. *any* user-defined symbol names (such as `SUBROUTINE FOO'); Numbers 68
  2515. and 73 warn about any user-defined symbol names longer than one
  2516. character that don't have at least one non-alphabetic character after
  2517. the first; Numbers 69 and 74 disallow any references to intrinsics; and
  2518. Numbers 70, 71, 75, and 76 are combinations of the restrictions in
  2519. 67+69, 68+69, 72+74, and 73+74, respectively.
  2520.    All redundant combinations are shown in the above tables anyplace
  2521. where more than one setting is shown for a low-level switch.  For
  2522. example, `B0-2-' means either setting 0 or 2 is valid for switch B.
  2523. The "proper" setting in such a case is the one that copies the setting
  2524. of switch A--any other setting might slightly reduce the speed of the
  2525. compiler, though possibly to an unmeasurable extent.
  2526.    All remaining combinations are useless in that they prevent
  2527. successful compilation of non-null source files (source files with
  2528. something other than comments).
  2529. File: ^.!gcc.docs.fortran.g77,  Node: Intrinsics,  Next: Dialects,  Prev: Case Sensitivity,  Up: Language
  2530. Intrinsics
  2531. ==========
  2532.    A given specific intrinsic belongs in one or more groups.  Each group
  2533. is deleted, disabled, hidden, or enabled by default or a command-line
  2534. option.  The meaning of each term follows.
  2535. Deleted
  2536.      No intrinsics are recognized as belonging to that group.
  2537. Disabled
  2538.      Intrinsics are recognized as belonging to the group, but
  2539.      references to them (other than via the `INTRINSIC' statement) are
  2540.      disallowed through that group.
  2541. Hidden
  2542.      Intrinsics in that group are recognized and enabled (if
  2543.      implemented) *only* if the first mention of the actual name of an
  2544.      intrinsic in a program unit is in an `INTRINSIC' statement.
  2545. Enabled
  2546.      Intrinsics in that group are recognized and enabled (if
  2547.      implemented).
  2548.    The distinction between deleting and disabling a group is illustrated
  2549. by the following example.  Assume intrinsic `FOO' belongs only to group
  2550. `FGR'.  If group `FGR' is deleted, the following program unit will
  2551. successfully compile, because `FOO()' will be seen as a reference to an
  2552. external function named `FOO':
  2553.      PRINT *, FOO()
  2554.      END
  2555. If group `FGR' is disabled, compiling the above program will produce
  2556. diagnostics, either because the `FOO' intrinsic is improperly invoked
  2557. or, if properly invoked, it is not enabled.  To change the above
  2558. program so it references an external function `FOO' instead of the
  2559. disabled `FOO' intrinsic, add the following line to the top:
  2560.      EXTERNAL FOO
  2561. So, deleting a group tells `g77' to pretend as though the intrinsics in
  2562. that group do not exist at all, whereas disabling it tells `g77' to
  2563. recognize them as (disabled) intrinsics in intrinsic-like contexts.
  2564.    Hiding a group is like enabling it, but the intrinsic must be first
  2565. named in an `INTRINSIC' statement to be considered a reference to the
  2566. intrinsic rather than to an external procedure.  This might be the
  2567. "safest" way to treat a new group of intrinsics when compiling old
  2568. code, because it allows the old code to be generally written as if
  2569. those new intrinsics never existed, but to be changed to use them by
  2570. inserting `INTRINSIC' statements in the appropriate places.  However,
  2571. it should be the goal of development to use `EXTERNAL' for all names of
  2572. external procedures that might be intrinsic names.
  2573.    If an intrinsic is in more than one group, it is enabled if any of
  2574. its containing groups are enabled; if not so enabled, it is hidden if
  2575. any of its containing groups are hidden; if not so hidden, it is
  2576. disabled if any of its containing groups are disabled; if not so
  2577. disabled, it is deleted.  This extra complication is necessary because
  2578. some intrinsics, such as `IBITS', belong to more than one group, and
  2579. hence should be enabled if any of the groups to which they belong are
  2580. enabled, and so on.
  2581.    The groups are:
  2582. `dcp'
  2583.      `DOUBLE COMPLEX' intrinsics from the standards (F77, F90).
  2584. `f2c'
  2585.      Intrinsics supported by AT&T's `f2c' converter and/or `libf2c'.
  2586. `f90'
  2587.      Fortran 90 intrinsics.
  2588. `mil'
  2589.      MIL-STD 1753 intrinsics (`MVBITS', `IAND', `BTEST', and so on).
  2590. `unix'
  2591.      UNIX intrinsics (`IARGC', `EXIT', `ERF', and so on).
  2592. `vxt'
  2593.      VAX/VMS FORTRAN (current as of v4) intrinsics.
  2594. File: ^.!gcc.docs.fortran.g77,  Node: Dialects,  Next: Object Compatibility,  Prev: Intrinsics,  Up: Language
  2595. GNU Fortran Dialects
  2596. ====================
  2597.    The `-fvxt-not-f90' and `-ff90-not-vxt' command-line options control
  2598. how `g77' interprets certain tokens and constructs that have different
  2599. meanings in VAX FORTRAN (circa v4) and Fortran 90.  (Generally, this
  2600. manual uses the invented acronym VXT to refer to many popular VAX
  2601. FORTRAN extensions, though not necessarily those that are specific to
  2602. the VAX processor architecture or the VMS operating system.  An
  2603. extension offered by a Digital Fortran product that also is offered by
  2604. several other Fortran products for different kinds of systems is
  2605. probably going to be considered for inclusion in `g77' someday, and is
  2606. considered a VXT extension.)
  2607.    When `-ff90-not-vxt' is specified, the following interpretations are
  2608. made (and, when `-fvxt-not-f90' is in effect, the opposite
  2609. interpretations are made):
  2610.    * Double-quote character (`"') delimits character constant just as
  2611.      does apostrophe (`''), rather than beginning an octal constant of
  2612.      `INTEGER' type.
  2613.    * An exclamation point (`!') in column 5 of fixed-form source file
  2614.      treated as a continuation character rather than the beginning of a
  2615.      comment (as it does in any other column).
  2616.    * `TYPE FOO' and `TYPE (FOO), BAR' statements are recognized as the
  2617.      Fortran 90 variety, not I/O statements.  (However, the F90 variety
  2618.      is *not* supported, so this really just ensures that `g77' will
  2619.      produce a diagnostic instead of trying to implement the VXT `TYPE'
  2620.      statement--which currently is not supported either.)
  2621. File: ^.!gcc.docs.fortran.g77,  Node: Object Compatibility,  Next: Distensions,  Prev: Dialects,  Up: Language
  2622. Object Compatibility
  2623. ====================
  2624.    An individual Fortran source file can be compiled to an object
  2625. (`*.o') file instead of to the final program executable.  This allows
  2626. several portions of a program to be compiled at different times and
  2627. linked together whenever a new version of the program is needed.
  2628. However, it introduces the issue of "object compatibility" across the
  2629. various object files (and libraries, or `*.a' files) that are linked
  2630. together to produce any particular exectable file.
  2631.    Object compatibility is an issue when combining, in one program,
  2632. Fortran code compiled by more than one compiler (or more than one
  2633. configuration of a compiler).  If the compilers disagree on how to
  2634. transform the names of procedures, there will normally be errors when
  2635. linking such programs.  Worse, if the compilers agree on naming, but
  2636. disagree on issues like how to pass parameters, return arguments, and
  2637. lay out `COMMON' areas, the earliest detected errors might be the
  2638. incorrect results produced by the program (and that assumes these
  2639. errors are detected, which is not always the case).
  2640.    Normally, `g77' generates code that is object-compatible with code
  2641. generated by a version of `f2c' configured (with, for example, `f2c.h'
  2642. definitions) to be generally compatible with `g77' as built by `gcc'.
  2643. (Normally, `f2c' will, by default, conform to the appropriate
  2644. configuration, but it is possible that older or perhaps even newer
  2645. versions of `f2c', or versions having certain configuration changes to
  2646. `f2c' internals, will produce object files that are incompatible with
  2647. `g77'.)
  2648.    For example, a Fortran string subroutine argument will become two
  2649. arguments on the C side: a `char *' and an `int' length.
  2650.    Much of this compatibility results from the fact that `g77' uses the
  2651. same run-time library, `libf2c', used by `f2c'.
  2652.    Other compilers might or might not generate code that is
  2653. object-compatible with `libf2c' and current `g77', and some might offer
  2654. such compatibility only when explicitly selected via a command-line
  2655. option to the compiler.
  2656. * Menu:
  2657. * Dropping f2c Compatibility::  When speed is more important.
  2658. * Other Compilers::             Interoperation with code from other compilers.
  2659. File: ^.!gcc.docs.fortran.g77,  Node: Dropping f2c Compatibility,  Next: Other Compilers,  Up: Object Compatibility
  2660. Dropping f2c Compatibility
  2661. --------------------------
  2662.    Specifying `-fno-f2c' allows `g77' to generate, in some cases,
  2663. faster code, by not needing to allow to the possibility of linking with
  2664. code compiled by `f2c'.
  2665.    For example, this affects how `REAL', `COMPLEX', and `DOUBLE
  2666. COMPLEX' functions are called.  With `-fno-f2c', they are compiled as
  2667. returning the appropriate `gcc' type (`float', `__complex__ float',
  2668. `__complex__ double', in many configurations).
  2669.    With `-ff2c' in force, they are compiled differently (with perhaps
  2670. slower run-time performance) to accommodate the restrictions inherent
  2671. in `f2c''s use of K&R C as an intermediate language--`REAL' functions
  2672. return double, while `COMPLEX' functions return `void' and use an extra
  2673. argument pointing to a place for the functions to return their values.
  2674.    It is possible that, in some cases, leaving `-ff2c' in force might
  2675. produce faster code than using `-fno-f2c'.  Feel free to experiment,
  2676. but remember to experiment with changing the way *entire programs and
  2677. their Fortran libraries are compiled* at a time, since this sort of
  2678. experimentation affects the interface of code generated for a Fortran
  2679. source file--that is, it affects object compatibility.
  2680.    Note that `f2c' compatibility is a fairly static target to achieve,
  2681. though not necessarily perfectly so, since, like `g77', it is still
  2682. being improved.  However, specifying `-fno-f2c' causes `g77' to
  2683. generate code that will probably be incompatible with code generated by
  2684. future versions of `g77' when the same option is in force.  You should
  2685. make sure you are always able to recompile complete programs from
  2686. source code when upgrading to new versions of `g77' or `f2c',
  2687. especially when using options such as `-fno-f2c'.
  2688.    Therefore, if you are using `g77' to compile libraries and other
  2689. object files for possible future use and you don't want to require
  2690. recompilation for future use with subsequent versions of `g77', you
  2691. might want to stick with `f2c' compatibility for now, and carefully
  2692. watch for any announcements about changes to the `f2c'/`libf2c'
  2693. interface that might affect existing programs (thus requiring
  2694. recompilation).
  2695.    It is probable that a future version of `g77' will not, by default,
  2696. generate object files compatible with `f2c' and not use `libf2c'.  If
  2697. you expect to depend on this compatibility in the long term, use the
  2698. options `-ff2c -ff2c-library' when compiling all of the applicable code.
  2699. This should either cause `g77' to produce compatible code (at the
  2700. expense of the availability of some features and performance), or at
  2701. the very least trigger compiler warning messages, in future versions of
  2702. `g77'.
  2703. File: ^.!gcc.docs.fortran.g77,  Node: Other Compilers,  Prev: Dropping f2c Compatibility,  Up: Object Compatibility
  2704. Other Compilers
  2705. ---------------
  2706.    On systems with Fortran compilers other than `f2c' and `g77', code
  2707. compiled by `g77' is not expected to work well with code compiled by
  2708. the native compiler.  (This is true for `f2c'-compiled objects as well.)
  2709. Libraries compiled with the native compiler probably will have to be
  2710. recompiled with `g77' to be used with `g77'-compiled code.
  2711.    Reasons for such incompatibilities include:
  2712.    * There might be differences in the way names of Fortran procedures
  2713.      are translated for use in the system's object-file format.  For
  2714.      example, the statement `CALL FOO' might be compiled by `g77' to
  2715.      call a procedure the linker `ld' sees given the name `_foo_',
  2716.      while the apparently corresponding statement `SUBROUTINE FOO'
  2717.      might be compiled by the native compiler to define the
  2718.      linker-visible name `_foo', or `_FOO_', and so on.
  2719.    * There might be subtle type mismatches which cause subroutine
  2720.      arguments and function return values to get corrupted.
  2721.      This is why simply getting `g77' to transform procedure names the
  2722.      same way a native compiler does is not usually a good idea--unless
  2723.      some effort has been made to ensure that, aside from the way the
  2724.      two compilers transform procedure names, everything else about the
  2725.      way they generate code for procedure interfaces is identical.
  2726.    * Native compilers use libraries of private I/O routines which will
  2727.      not be available at link time unless you have the native
  2728.      compiler--and you would have to explicitly ask for them.
  2729.      For example, on the Sun you would have to add `-L/usr/lang/SCx.x
  2730.      -lF77 -lV77' to the link command.
  2731. File: ^.!gcc.docs.fortran.g77,  Node: Distensions,  Prev: Object Compatibility,  Up: Language
  2732. Distensions
  2733. ===========
  2734.    The `-fugly' command-line options determine whether certain features
  2735. supported by VAX FORTRAN and other such compilers, but considered too
  2736. ugly to be in code that can be changed to use safer and/or more
  2737. portable constructs, are accepted.  These are humorously referred to as
  2738. "distensions", extensions that just plain look ugly in the harsh light
  2739. of day.
  2740.    The constructs enabled via `-fugly' include:
  2741.    * Automatic conversion between `INTEGER' and `LOGICAL' as dictated by
  2742.      context (typically implies nonportable dependencies on how a
  2743.      particular implementation encodes `.TRUE.' and `.FALSE.').
  2744.    * Use of typeless and Hollerith constants in non-standard places
  2745.      (the "standard" here being the appendix in ANSI FORTRAN 77 and the
  2746.      descriptions in MIL-STD 1753), plus in places controlled by
  2747.      `-fugly-args' and `-fugly-init'.
  2748.    * Use of a `LOGICAL' variable in `ASSIGN' and assigned-`GOTO'
  2749.      statements.
  2750.    * Use of a single trailing comma to mean "pass an extra trailing null
  2751.      argument" in a list of actual arguments to a procedure other than a
  2752.      statement function.
  2753.      For example, `CALL FOO(,)' means "pass two null arguments" when
  2754.      `-fugly' is used, rather than "pass one null argument".
  2755.    The construct disabled via `-fno-ugly-args' is:
  2756.    * Passing of typeless and Hollerith constants as actual arguments in
  2757.      procedure invocations.
  2758.      For example, `CALL FOO(4HABCD)'.
  2759.    The constructs disabled by `-fno-ugly-init' are:
  2760.    * Use of Hollerith and typeless constants in contexts where they set
  2761.      initial (compile-time) values for variables, arrays, and named
  2762.      constants--that is, `DATA' and `PARAMETER' statements, plus
  2763.      type-declaration statements specifying initial values.
  2764.    * In the same contexts as above, use of character constants to
  2765.      initialize numeric items and vice versa (one constant per item).
  2766.    * Use of Hollerith and typeless constants on the right-hand side of
  2767.      assignment statements to numeric types, and in other contexts
  2768.      (such as passing arguments to in invocations of intrinsic
  2769.      procedures and statement functions) that are treated as
  2770.      assignments to known types (the dummy arguments, in these cases).
  2771. File: ^.!gcc.docs.fortran.g77,  Node: Installation,  Next: Debugging and Interfacing,  Prev: Language,  Up: Top
  2772. Installing GNU Fortran
  2773. **********************
  2774. * Menu:
  2775. * Prerequisites::          Make sure your system is ready for `g77'.
  2776. * Problems Installing::    Known trouble areas.
  2777. * Quick Start::            The easier procedure for non-experts.
  2778. * Complete Installation::  For experts, or those who want to be: the details.
  2779. * Distributing Binaries::  If you plan on distributing your `g77'.
  2780. * Settings::               Some notes on `g77' internals.
  2781.    The following information describes how to install `g77'.
  2782.    The information in this file generally pertains to dealing with
  2783. *source* distributions of `g77' and `gcc'.  It is possible that some of
  2784. this information will be applicable to some *binary* distributions of
  2785. these products--however, since these distributions are not made by the
  2786. maintainers of `g77', responsibility for binary distributions rests with
  2787. whoever built and first distributed them.
  2788.    Nevertheless, efforts to make `g77' easier to both build and install
  2789. from source and package up as a binary distribution are ongoing.
  2790. File: ^.!gcc.docs.fortran.g77,  Node: Prerequisites,  Next: Problems Installing,  Up: Installation
  2791. Prerequisites
  2792. =============
  2793.    The procedures described to unpack, configure, build, and install
  2794. `g77' assume your system has certain programs already installed.
  2795.    The following prerequisites should be met by your system before you
  2796. follow the `g77' installation instructions:
  2797. `gzip'
  2798.      To unpack the `gcc' and `g77' distributions, you'll need the
  2799.      `gunzip' utility in the `gzip' distribution.  Most UNIX systems
  2800.      already have `gzip' installed.  If yours doesn't, you can get it
  2801.      from the FSF.
  2802.      Note that you'll need `tar' and other utilities as well, but all
  2803.      UNIX systems have these.  There are GNU versions of all these
  2804.      available--in fact, a complete GNU UNIX system can be put together
  2805.      on most systems, if desired.
  2806. `gcc-2.7.2.tar.gz'
  2807.      You need to have this, or some other applicable, version of `gcc'
  2808.      on your system.  The version should be an exact copy of a
  2809.      distribution from the FSF.  It is approximately 7MB large.
  2810.      If you've already unpacked `gcc-2.7.2.tar.gz' into a directory
  2811.      (named `gcc-2.7.2') called the "source tree" for `gcc', you can
  2812.      delete the distribution itself, but you'll need to remember to
  2813.      skip any instructions to unpack this distribution.
  2814.      Without an applicable `gcc' source tree, you cannot build `g77'.
  2815.      You can obtain an FSF distribution of `gcc' from the FSF.
  2816. `g77-0.5.18.tar.gz'
  2817.      You probably have already unpacked this distribution, or you are
  2818.      reading an advanced copy of this manual, which is contained in
  2819.      this distribution.  This distribution approximately 1MB large.
  2820.      You can obtain an FSF distribution of `g77' from the FSF, the same
  2821.      way you obtained `gcc'.
  2822. 100MB disk space
  2823.      For a complete "bootstrap" build, about 100MB of disk space is
  2824.      required for `g77' by the author's current Linux system.
  2825.      Some juggling can reduce the amount of space needed; during the
  2826.      bootstrap process, once Stage 3 starts, during which the version
  2827.      of `gcc' that has been copied into the `stage2/' directory is used
  2828.      to rebuild the system, you can delete the `stage1/' directory to
  2829.      free up some space.
  2830.      It is likely that many systems don't require the complete
  2831.      bootstrap build, as they already have a recent version of `gcc'
  2832.      installed.  Such systems might be able to build `g77' with only
  2833.      about 75MB of free space.
  2834. `patch'
  2835.      Although you can do everything `patch' does yourself, by hand,
  2836.      without much trouble, having `patch' installed makes installation
  2837.      of new versions of GNU utilities such as `g77' so much easier that
  2838.      it is worth getting.  You can obtain `patch' the same way you
  2839.      obtained `gcc' and `g77'.
  2840.      In any case, you can apply patches by hand--patch files are
  2841.      designed for humans to read them.
  2842. `make'
  2843.      Your system must have `make', and you will probably save yourself
  2844.      a lot of trouble if it is GNU `make' (sometimes referred to as
  2845.      `gmake').
  2846.      Your system must have a working C compiler.
  2847.      *Note Installing GNU CC: (gcc)Installation, for more information
  2848.      on prerequisites for installing `gcc'.
  2849. `bison'
  2850.      If you do not have `bison' installed, you can usually work around
  2851.      any need for it, since `g77' itself does not use it, and `gcc'
  2852.      normally includes all files generated by running it in its
  2853.      distribution.  You can obtain `bison' the same way you obtained
  2854.      `gcc' and `g77'.
  2855.      *Note Missing bison?::, for information on how to work around not
  2856.      having `bison'.
  2857. `makeinfo'
  2858.      If you are missing `makeinfo', you can usually work around any
  2859.      need for it.  You can obtain `makeinfo' the same way you obtained
  2860.      `gcc' and `g77'.
  2861.      *Note Missing makeinfo?::, for information on getting around the
  2862.      lack of `makeinfo'.
  2863. `root' access
  2864.      To perform the complete installation procedures on a system, you
  2865.      need to have `root' access to that system, or equivalent access.
  2866.      Portions of the procedure (such as configuring and building `g77')
  2867.      can be performed by any user with enough disk space and virtual
  2868.      memory.
  2869.      However, these instructions are oriented towards less-experienced
  2870.      users who want to install `g77' on their own personal systems.
  2871.      System administrators with more experience will want to determine
  2872.      for themselves how they want to modify the procedures described
  2873.      below to suit the needs of their installation.
  2874. File: ^.!gcc.docs.fortran.g77,  Node: Problems Installing,  Next: Quick Start,  Prev: Prerequisites,  Up: Installation
  2875. Problems Installing
  2876. ===================
  2877.    This is a list of problems (and some apparent problems which don't
  2878. really mean anything is wrong) that show up when configuring, building,
  2879. installing, or porting GNU Fortran.
  2880.    *Note Installation Problems: (gcc)Installation Problems, for more
  2881. information on installation problems that can afflict either `gcc' or
  2882. `g77'.
  2883. * Menu:
  2884. * General Problems::         Problems afflicting most or all systems.
  2885. * Cross-compiler Problems::  Problems afflicting cross-compilation setups.
  2886. File: ^.!gcc.docs.fortran.g77,  Node: General Problems,  Next: Cross-compiler Problems,  Up: Problems Installing
  2887. General Problems
  2888. ----------------
  2889.    * On SunOS systems, linking the `f771' program produces an error
  2890.      message concerning an undefined symbol named `_strtoul'.
  2891.      This is not a `g77' bug.  *Note Patching GNU Fortran::, for
  2892.      information on a workaround provided by `g77'.
  2893.      The proper fix is either to upgrade your system to one that
  2894.      provides a complete ANSI C environment, or improve `gcc' so that
  2895.      it provides one for all the languages and configurations it
  2896.      supports.
  2897.      *Note:* In earlier versions of `g77', an automated workaround for
  2898.      this problem was attempted.  It worked for systems without
  2899.      `_strtoul', substituting the incomplete-yet-sufficient version
  2900.      supplied with `g77' for those systems.  However, the automated
  2901.      workaround failed mysteriously for systems that appeared to have
  2902.      conforming ANSI C environments, and it was decided that, lacking
  2903.      resources to more fully investigate the problem, it was better to
  2904.      not punish users of those systems either by requiring them to work
  2905.      around the problem by hand or by always substituting an incomplete
  2906.      `strtoul()' implementation when their systems had a complete,
  2907.      working one.  Unfortunately, this meant inconveniencing users of
  2908.      systems not having `strtoul()', but they're using obsolete (and
  2909.      generally unsupported) systems anyway.
  2910.    * It'd be helpful if `g77''s `Makefile.in' or `Make-lang.in' would
  2911.      create the various `stageN' directories and their subdirectories,
  2912.      so expert installers wouldn't have to reconfigure after cleaning
  2913.      up.
  2914.    * Improvements to the way `libf2c' is built could make building
  2915.      `g77' as a cross-compiler easier--for example, passing and using
  2916.      `LD' and `AR' in the appropriate ways.
  2917.    * `g77' currently requires application of a patch file to the gcc
  2918.      compiler tree (at least up through gcc version 2.7.0).  The
  2919.      necessary patches should be folded in to the mainline gcc
  2920.      distribution.
  2921.      (Some combinations of versions of `g77' and `gcc' might actually
  2922.      *require* no patches, but the patch files will be provided anyway
  2923.      as long as there are more changes expected in subsequent releases.
  2924.      These patch files might contain unnecessary, but possibly helpful,
  2925.      patches.  As a result, it is possible this issue might never be
  2926.      resolved, except by eliminating the need for the person
  2927.      configuring `g77' to apply a patch by hand, by going to a more
  2928.      automated approach (such as configure-time patching).
  2929.    * It should be possible to build the runtime without building `cc1'
  2930.      and other non-Fortran items, but, for now, an easy way to do that
  2931.      is not yet established.
  2932.    * Compiling `g77' requires GNU C, not just ANSI C.  Fixing this
  2933.      wouldn't be very hard (just tedious), but the code using GNU
  2934.      extensions to the C language is expected to be rewritten for 0.6
  2935.      anyway, so there are no plans for an interim fix.
  2936. File: ^.!gcc.docs.fortran.g77,  Node: Cross-compiler Problems,  Prev: General Problems,  Up: Problems Installing
  2937. Cross-compiler Problems
  2938. -----------------------
  2939.    `g77' has been in alpha testing since September of 1992, and in
  2940. public beta testing since February of 1995.  Alpha testing was done by
  2941. a small number of people worldwide on a fairly wide variety of
  2942. machines, involving self-compilation in most or all cases.  Beta
  2943. testing has been done primarily via self-compilation, but in more and
  2944. more cases, cross-compilation (and "criss-cross compilation", where a
  2945. version of a compiler is built on one machine to run on a second and
  2946. generate code that runs on a third) has been tried and has succeeded,
  2947. to varying extents.
  2948.    Generally, `g77' can be ported to any configuration to which `gcc',
  2949. `f2c', and `libf2c' can be ported and made to work together, aside from
  2950. the known problems described in this manual.  If you want to port `g77'
  2951. to a particular configuration, you should first make sure `gcc' and
  2952. `libf2c' can be ported to that configuration before focusing on `g77',
  2953. because `g77' is so dependent on them.
  2954.    Even for cases where `gcc' and `libf2c' work, you might run into
  2955. problems with cross-compilation on certain machines, for several
  2956. reasons.
  2957.    * There is one known bug (a design bug to be fixed in 0.6) that
  2958.      prevents configuration of `g77' as a cross-compiler in some cases,
  2959.      though there are assumptions made during configuration that
  2960.      probably make doing non-self-hosting builds a hassle, requiring
  2961.      manual intervention.
  2962.    * `gcc' might still have some trouble being configured for certain
  2963.      combinations of machines.  For example, it might not know how to
  2964.      handle floating-point constants.
  2965.    * There are still some challenges putting together the right
  2966.      run-time libraries (needed by `libf2c') for a target system,
  2967.      depending on the systems involved in the configuration.  (This is
  2968.      a general problem with cross-compilation, and with `gcc' in
  2969.      particular.)
  2970. File: ^.!gcc.docs.fortran.g77,  Node: Quick Start,  Next: Complete Installation,  Prev: Problems Installing,  Up: Installation
  2971. Quick Start
  2972. ===========
  2973.    This procedure configures, builds, and installs `g77' "out of the
  2974. box" and works on most UNIX systems.  Each command is identified by a
  2975. unique number, used in the explanatory text that follows.  For the most
  2976. part, the output of each command is not shown, though indications of
  2977. the types of responses are given in a few cases.
  2978.    To perform this procedure, the installer must be logged in as user
  2979. `root'.  Much of it can be done while not logged in as `root', and
  2980. users experienced with UNIX administration should be able to modify the
  2981. procedure properly to do so.
  2982.    Following traditional UNIX conventions, it is assumed that the
  2983. source trees for `g77' and `gcc' will be placed in `/usr/src'.  It also
  2984. is assumed that the source distributions themselves already reside in
  2985. `/usr/FSF', a naming convention used by the author of `g77' on his own
  2986. system:
  2987.      /usr/FSF/gcc-2.7.2.tar.gz
  2988.      /usr/FSF/g77-0.5.18.tar.gz
  2989.    Users of the following systems should not blindly follow these
  2990. quick-start instructions, because of problems their systems have coping
  2991. with straightforward installation of `g77':
  2992.    * SunOS
  2993.    * Alpha
  2994.    Instead, see *Note Complete Installation::, for detailed information
  2995. on how to configure, build, and install `g77' for your particular
  2996. system.  Also, see *Note Known Causes of Trouble with GNU Fortran:
  2997. Trouble, for information on bugs and other problems known to afflict the
  2998. installation process, and how to report newly discovered ones.
  2999.    If your system is *not* on the above list, and *is* a UNIX system or
  3000. one of its variants, you should be able to follow the instructions
  3001. below.  If you vary *any* of the steps below, you might run into
  3002. trouble, including possibly breaking existing programs for other users
  3003. of your system.  Before doing so, it is wise to review the explanations
  3004. of some of the steps.  These explanations follow this list of steps.
  3005.      sh[ 1]# `cd /usr/src'
  3006.      
  3007.      sh[ 2]# `gunzip -c < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -'
  3008.      
  3009.      [Might say "Broken pipe"...that is normal on some systems.]
  3010.      sh[ 3]# `gunzip -c < /usr/FSF/g77-0.5.18.tar.gz | tar xf -'
  3011.      
  3012.      ["Broken pipe" again possible.]
  3013.      sh[ 4]# `ln -s gcc-2.7.2 gcc'
  3014.      
  3015.      sh[ 5]# `ln -s g77-0.5.18 g77'
  3016.      
  3017.      sh[ 6]# `mv -i g77/* gcc'
  3018.      
  3019.      [No questions should be asked by mv here; or, you made a mistake.]
  3020.      sh[ 7]# `patch -p1 -V t -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff'
  3021.      
  3022.      [Unless patch complains about rejected patches, this step worked.]
  3023.      sh[ 8]# `cd gcc'
  3024.      sh[ 9]# `touch f77-install-ok'
  3025.      
  3026.      [Do not do the above if your system already has an f77
  3027.      command, unless you've checked that overwriting it
  3028.      is okay.]
  3029.      sh[10]# `touch f2c-install-ok'
  3030.      
  3031.      [Do not do the above if your system already has an f2c
  3032.      command, unless you've checked that overwriting it
  3033.      is okay.  Else, `touch f2c-exists-ok'.]
  3034.      sh[11]# `./configure --prefix=/usr'
  3035.      
  3036.      [Do not do the above if gcc is not installed in /usr/bin.
  3037.      You might need a different `--prefix=...', as
  3038.      described below.]
  3039.      sh[12]# `make bootstrap'
  3040.      
  3041.      [This takes a long time, and is where most problems occur.]
  3042.      sh[13]# `rm -fr stage1'
  3043.      
  3044.      sh[14]# `make -k install'
  3045.      
  3046.      [The actual installation.]
  3047.      sh[15]# `g77 -v'
  3048.      
  3049.      [Verify that g77 is installed, obtain version info.]
  3050.      sh[16]#
  3051.    *Note Updating Your Info Directory: Updating Documentation, for
  3052. information on how to update your system's top-level `info' directory
  3053. to contain a reference to this manual, so that users of `g77' can
  3054. easily find documentation instead of having to ask you for it.
  3055.    Elaborations of many of the above steps follows:
  3056. Step 1: `cd /usr/src'
  3057.      You can build `g77' pretty much anyplace.  By convention, this
  3058.      manual assumes `/usr/src'.  It might be helpful if other users on
  3059.      your system knew where to look for the source code for the
  3060.      installed version of `g77' and `gcc' in any case.
  3061. Step 4: `ln -s gcc-2.7.2 gcc'
  3062. Step 5: `ln -s g77-0.5.18 g77'
  3063.      These commands mainly help reduce typing, and help reduce visual
  3064.      clutter in examples in this manual showing what to type to install
  3065.      `g77'.
  3066.      *Note Unpacking::, for information on using distributions of `g77'
  3067.      made by organizations other than the FSF.
  3068. Step 6: `mv -i g77/* gcc'
  3069.      After doing this, you can, if you like, type `rm g77' and `rmdir
  3070.      g77-0.5.18' to remove the empty directory and the symbol link to
  3071.      it.  But, it might be helpful to leave them around as quick
  3072.      reminders of which version(s) of `g77' are installed on your
  3073.      system.
  3074.      *Note Unpacking::, for information on the contents of the `g77'
  3075.      directory (as merged into the `gcc' directory).
  3076. Step 7: `patch -p1 ...'
  3077.      This can produce a wide variety of printed output, from `Hmm, I
  3078.      can't seem to find a patch in there anywhere...' to long lists of
  3079.      messages indicated that patches are being found, applied
  3080.      successfully, and so on.
  3081.      If messages about "fuzz", "offset", or especially "reject files"
  3082.      are printed, it might mean you applied the wrong patch file.  If
  3083.      you believe this is the case, it is best to restart the sequence
  3084.      after deleting (or at least renaming to unused names) the
  3085.      top-level directories for `g77' and `gcc' and their symbolic links.
  3086.      After this command finishes, the `gcc' directory might have old
  3087.      versions of several files as saved by `patch'.  To remove these,
  3088.      after `cd gcc', type `rm -i *.~*~'.
  3089.      *Note Merging Distributions::, for more information.
  3090. Step 9: `touch f77-install-ok'
  3091.      Don't do this if you don't want to overwrite an existing version
  3092.      of `f77' (such as a native compiler, or a script that invokes
  3093.      `f2c').  Otherwise, installation will overwrite the `f77' command
  3094.      and the `f77' man pages with copies of the corresponding `g77'
  3095.      material.
  3096.      *Note Installing `f77': Installing f77, for more information.
  3097. Step 10: `touch f2c-install-ok'
  3098.      Don't do this if you don't want to overwrite an existing
  3099.      installation of `libf2c' (though, chances are, you do).  Instead,
  3100.      `touch f2c-exists-ok' to allow the installation to continue
  3101.      without any error messages about `/usr/lib/libf2c.a' already
  3102.      existing.
  3103.      *Note Installing `f2c': Installing f2c, for more information.
  3104. Step 11: `./configure --prefix=/usr'
  3105.      This is where you specify that the `g77' executable is to be
  3106.      installed in `/usr/bin/', the `libf2c.a' library is to be
  3107.      installed in `/usr/lib/', and so on.
  3108.      You should ensure that any existing installation of the `gcc'
  3109.      executable is in `/usr/bin/'.  Otherwise, installing `g77' so that
  3110.      it does not fully replace the existing installation of `gcc' is
  3111.      likely to result in the inability to compile Fortran programs.
  3112.      *Note Where in the World Does Fortran (and GNU C) Go?: Where to
  3113.      Install, for more information on determining where to install
  3114.      `g77'.  *Note Configuring gcc::, for more information on the
  3115.      configuration process triggered by invoking the `./configure'
  3116.      script.
  3117. Step 12: `make bootstrap'
  3118.      *Note Installing GNU CC: (gcc)Installation, for information on the
  3119.      kinds of diagnostics you should expect during this procedure.
  3120.      *Note Building gcc::, for complete `g77'-specific information on
  3121.      this step.
  3122. Step 13: `rm -fr stage1'
  3123.      You don't need to do this, but it frees up disk space.
  3124. Step 14: `make -k install'
  3125.      If this doesn't seem to work, try:
  3126.           make -k install install-libf77 install-f2c-all
  3127.      *Note Installation of Binaries::, for more information.
  3128.      *Note Updating Your Info Directory: Updating Documentation, for
  3129.      information on entering this manual into your system's list of
  3130.      texinfo manuals.
  3131. File: ^.!gcc.docs.fortran.g77,  Node: Complete Installation,  Next: Distributing Binaries,  Prev: Quick Start,  Up: Installation
  3132. Complete Installation
  3133. =====================
  3134.    Here is the complete `g77'-specific information on how to configure,
  3135. build, and install `g77'.
  3136. * Menu:
  3137. * Unpacking::
  3138. * Merging Distributions::
  3139. * f77: Installing f77.
  3140. * f2c: Installing f2c.
  3141. * Patching GNU Fortran::
  3142. * Where to Install::
  3143. * Configuring gcc::
  3144. * Building gcc::
  3145. * Pre-installation Checks::
  3146. * Installation of Binaries::
  3147. * Updating Documentation::
  3148. * bison: Missing bison?.
  3149. * makeinfo: Missing makeinfo?.
  3150. File: ^.!gcc.docs.fortran.g77,  Node: Unpacking,  Next: Merging Distributions,  Up: Complete Installation
  3151. Unpacking
  3152. ---------
  3153.    The `gcc' source distribution is a stand-alone distribution.  It is
  3154. designed to be unpacked (producing the `gcc' source tree) and built as
  3155. is, assuming certain prerequisites are met (including the availability
  3156. of compatible UNIX programs such as `make', `cc', and so on).
  3157.    However, before building `gcc', you will want to unpack and merge
  3158. the `g77' distribution in with it, so that you build a Fortran-capable
  3159. version of `gcc', which includes the `g77' command, the necessary
  3160. run-time libraries, and this manual.
  3161.    Unlike `gcc', the `g77' source distribution is *not* a stand-alone
  3162. distribution.  It is designed to be unpacked and, afterwards,
  3163. immediately merged into an applicable `gcc' source tree.  That is, the
  3164. `g77' distribution *augments* a `gcc' distribution--without `gcc',
  3165. generally only the documentation is immediately usable.
  3166.    A sequence of commands typically used to unpack `gcc' and `g77' is:
  3167.      sh# `cd /usr/src'
  3168.      sh# `gunzip -d < /usr/FSF/gcc-2.7.2.tar.gz | tar xf -'
  3169.      sh# `gunzip -d < /usr/FSF/g77-0.5.18.tar.gz | tar xf -'
  3170.      sh# `ln -s gcc-2.7.2 gcc'
  3171.      sh# `ln -s g77-0.5.18 g77'
  3172.      sh# `mv -i g77/* gcc'
  3173.    *Notes:* The commands beginning with `gunzip...' might print `Broken
  3174. pipe...' as they complete.  That is nothing to worry about, unless you
  3175. actually *hear* a pipe breaking.  The `ln' commands are helpful in
  3176. reducing typing and clutter in installation examples in this manual.
  3177. Hereafter, the top level of `gcc' source tree is referred to as `gcc',
  3178. and the top level of just the `g77' source tree (prior to issuing the
  3179. `mv' command, above) is referred to as `g77'.
  3180.    There are three top-level names in a `g77' distribution:
  3181.      g77/COPYING.g77
  3182.      g77/README.g77
  3183.      g77/f
  3184.    All three entries should be moved (or copied) into a `gcc' source
  3185. tree (typically named after its version number and as it appears in the
  3186. FSF distributions--e.g. `gcc-2.7.2').
  3187.    `g77/f' is the subdirectory containing all of the code,
  3188. documentation, and other information that is specific to `g77'.  The
  3189. other two files exist to provide information on `g77' to someone
  3190. encountering a `gcc' source tree with `g77' already present, who has
  3191. not yet read these installation instructions and thus needs help
  3192. understanding that the source tree they are looking at does not come
  3193. from a single FSF distribution.  They also help people encountering an
  3194. unmerged `g77' source tree for the first time.
  3195.    *Note:* Please use *only* `gcc' and `g77' source trees as
  3196. distributed by the FSF.  Use of modified versions, such as the
  3197. Pentium-specific-optimization port of `gcc', is likely to result in
  3198. problems that appear to be in the `g77' code but, in fact, are not.  Do
  3199. not use such modified versions unless you understand all the
  3200. differences between them and the versions the FSF distributes--in which
  3201. case you should be able to modify the `g77' (or `gcc') source trees
  3202. appropriately so `g77' and `gcc' can coexist as they do in the stock
  3203. FSF distributions.
  3204. File: ^.!gcc.docs.fortran.g77,  Node: Merging Distributions,  Next: Installing f77,  Prev: Unpacking,  Up: Complete Installation
  3205. Merging Distributions
  3206. ---------------------
  3207.    After merging the `g77' source tree into the `gcc' source tree, the
  3208. final merge step is done by applying the pertinent patches the `g77'
  3209. distribution provides for the `gcc' source tree.
  3210.    Read the file `gcc/f/gbe/README', and apply the appropriate patch
  3211. file for the version of the GNU CC compiler you have, if that exists.
  3212. If the directory exists but the appropriate file does not exist, you
  3213. are using either an old, unsupported version, or a release one that is
  3214. newer than the newest `gcc' version supported by the version of `g77'
  3215. you have.
  3216.    GNU version numbers make it easy to figure out whether a particular
  3217. version of a distribution is newer or older than some other version of
  3218. that distribution.  The format is, generally, MAJOR.MINOR.PATCH, with
  3219. each field being a decimal number.  (You can safely ignore leading
  3220. zeros; for example, 1.5.3 is the same as 1.5.03.) The MAJOR field only
  3221. increases with time.  The other two fields are reset to 0 when the
  3222. field to their left is incremented; otherwise, they, too, only increase
  3223. with time.  So, version 2.6.2 is newer than version 2.5.8, and version
  3224. 3.0 is newer than both.  (Trailing `.0' fields often are omitted in
  3225. announcements and in names for distributions and the directories they
  3226. create.)
  3227.    If your version of `gcc' is older than the oldest version supported
  3228. by `g77' (as casually determined by listing the contents of
  3229. `gcc/f/gbe/'), you should obtain a newer, supported version of `gcc'.
  3230. (You could instead obtain an older version of `g77', or try and get
  3231. your `g77' to work with the old `gcc', but neither approach is
  3232. recommended, and you shouldn't bother reporting any bugs you find if you
  3233. take either approach, because they're probably already fixed in the
  3234. newer versions you're not using.)
  3235.    If your version of `gcc' is newer than the newest version supported
  3236. by `g77', it is possible that your `g77' will work with it anyway.  If
  3237. the version number for `gcc' differs only in the PATCH field, you might
  3238. as well try applying the `g77' patch that is for the newest version of
  3239. `gcc' having the same MAJOR and MINOR fields, as this is likely to work.
  3240.    So, for example, if `g77' has support for versions 2.7.0 and 2.7.1,
  3241. it is likely that `gcc-2.7.2' would work well with `g77' by using the
  3242. `2.7.1.diff' patch file provided with `g77' (aside from some offsets
  3243. reported by `patch', which usually are harmless).
  3244.    However, `gcc-2.8.0' would almost certainly not work with that
  3245. version of `g77' no matter which patch file was used, so a new version
  3246. of `g77' would be needed (and you should wait for it rather than
  3247. bothering the maintainers--*note User-Visible Changes: Changes.).
  3248.    This complexity is the result of `gcc' and `g77' being separate
  3249. distributions.  By keeping them separate, each product is able to be
  3250. independently improved and distributed to its user base more frequently.
  3251.    However, `g77' often requires changes to contemporary versions of
  3252. `gcc'.  Also, the GBE interface defined by `gcc' typically undergoes
  3253. some incompatible changes at least every time the MINOR field of the
  3254. version number is incremented, and such changes require corresponding
  3255. changes to the `g77' front end (FFE).
  3256.    It is hoped that the GBE interface, and the `gcc' and `g77' products
  3257. in general, will stabilize sufficiently for the need for hand-patching
  3258. to disappear.
  3259.    Invoking `patch' as described in `gcc/f/gbe/README' can produce a
  3260. wide variety of printed output, from `Hmm, I can't seem to find a patch
  3261. in there anywhere...' to long lists of messages indicated that patches
  3262. are being found, applied successfully, and so on.
  3263.    If messages about "fuzz", "offset", or especially "reject files" are
  3264. printed, it might mean you applied the wrong patch file.  If you
  3265. believe this is the case, it is best to restart the sequence after
  3266. deleting (or at least renaming to unused names) the top-level
  3267. directories for `g77' and `gcc' and their symbolic links.  That is
  3268. because `patch' might have partially patched some `gcc' source files,
  3269. so reapplying the correct patch file might result in the correct
  3270. patches being applied incorrectly (due to the way `patch' necessarily
  3271. works).
  3272.    After `patch' finishes, the `gcc' directory might have old versions
  3273. of several files as saved by `patch'.  To remove these, after `cd gcc',
  3274. type `rm -i *.~*~'.
  3275.    *Note:* `g77''s configuration file `gcc/f/config-lang.in' ensures
  3276. that the source code for the version of `gcc' being configured has at
  3277. least one GBE function required specifically by `g77'.  This function
  3278. was added to `gcc-2.7.1', making the patch file
  3279. `g77-0.5.17/f/gbe/2.7.1.diff' empty of actual patches.
  3280.    For `gcc-2.7.0' and earlier, this configuration-time checking should
  3281. catch failure to apply the correct patch and, if so caught, it should
  3282. abort the configuration with an explanation.  *Please* do not try to
  3283. disable the check, otherwise `g77' might well appear to build and
  3284. install correctly, and even appear to compile correctly, but could
  3285. easily produce broken code.
  3286.    `diff -rcp2N' is used to create the patch files in `gcc/f/gbe/'.
  3287. File: ^.!gcc.docs.fortran.g77,  Node: Installing f77,  Next: Installing f2c,  Prev: Merging Distributions,  Up: Complete Installation
  3288. Installing `f77'
  3289. ----------------
  3290.    You should decide whether you want installation of `g77' to also
  3291. install an `f77' command.  On systems with a native `f77', this is not
  3292. normally desired, so `g77' does not do this by default.
  3293.    If you want `f77' installed, create the file `f77-install-ok' (e.g.
  3294. via the UNIX command `touch f77-install-ok') in the source or build
  3295. top-level directory (the same directory in which the `g77' `f'
  3296. directory resides, not the `f' directory itself), or edit
  3297. `gcc/f/Make-lang.in' and change the definition of the
  3298. `F77_INSTALL_FLAG' macro appropriately.
  3299.    Usually, this means that, after typing `cd gcc', you would type
  3300. `touch f77-install-ok'.
  3301.    When you enable installation of `f77', either a link to or a direct
  3302. copy of the `g77' command is made.  Similarly, `f77.1' is installed as
  3303. a man page.
  3304.    (The `uninstall' target in the `gcc/Makefile' also tests this macro
  3305. and file, when invoked, to determine whether to delete the installed
  3306. copies of `f77' and `f77.1'.)
  3307.    *Note:* No attempt is yet made to install a program (like a shell
  3308. script) that provides compatibility with any other `f77' programs.
  3309. Only the most rudimentary invocations of `f77' will work the same way
  3310. with `g77'.
  3311. File: ^.!gcc.docs.fortran.g77,  Node: Installing f2c,  Next: Patching GNU Fortran,  Prev: Installing f77,  Up: Complete Installation
  3312. Installing `f2c'
  3313. ----------------
  3314.    Currently, `g77' does not include `f2c' itself in its distribution.
  3315. However, it does include a modified version of the `libf2c'.  This
  3316. version is normally compatible with `f2c', but has been modified to
  3317. meet the needs of `g77' in ways that might possibly be incompatible
  3318. with some versions or configurations of `f2c'.
  3319.    Decide how installation of `g77' should affect any existing
  3320. installation of `f2c' on your system.
  3321.    If you do not have `f2c' on your system (e.g. no `/usr/bin/f2c', no
  3322. `/usr/include/f2c.h', and no `/usr/lib/libf2c.a', `/usr/lib/libF77.a',
  3323. or `/usr/lib/libI77.a'), you don't need to be concerned with this item.
  3324.    If you do have `f2c' on your system, you need to decide how users of
  3325. `f2c' will be affected by your installing `g77'.  Since `g77' is
  3326. currently designed to be object-code-compatible with `f2c' (with very
  3327. few, clear exceptions), users of `f2c' might want to combine
  3328. `f2c'-compiled object files with `g77'-compiled object files in a
  3329. single executable.
  3330.    To do this, users of `f2c' should use the same copies of `f2c.h' and
  3331. `libf2c.a' that `g77' uses (and that get built as part of `g77').
  3332.    If you do nothing here, the `g77' installation process will not
  3333. overwrite the `include/f2c.h' and `lib/libf2c.a' files with its own
  3334. versions, and in fact will not even install `libf2c.a' for use with the
  3335. newly installed versions of `gcc' and `g77' if it sees that
  3336. `lib/libf2c.a' exists--instead, it will print an explanatory message
  3337. and skip this part of the installation.
  3338.    To install `g77''s versions of `f2c.h' and `libf2c.a' in the
  3339. appropriate places, create the file `f2c-install-ok' (e.g. via the UNIX
  3340. command `touch f2c-install-ok') in the source or build top-level
  3341. directory (the same directory in which the `g77' `f' directory resides,
  3342. not the `f' directory itself), or edit `gcc/f/Make-lang.in' and change
  3343. the definition of the `F2C_INSTALL_FLAG' macro appropriately.
  3344.    Usually, this means that, after typing `cd gcc', you would type
  3345. `touch f2c-install-ok'.
  3346.    Make sure that when you enable the overwriting of `f2c.h' and
  3347. `libf2c.a' as used by `f2c', you have a recent and properly configured
  3348. version of `bin/f2c' so that it generates code that is compatible with
  3349. `g77'.
  3350.    If you don't want installation of `g77' to overwrite `f2c''s existing
  3351. installation, but you do want `g77' installation to proceed with
  3352. installation of its own versions of `f2c.h' and `libf2c.a' in places
  3353. where `g77' will pick them up (even when linking `f2c'-compiled object
  3354. files--which might lead to incompatibilities), create the file
  3355. `f2c-exists-ok' (e.g. via the UNIX command `touch f2c-exists-ok') in
  3356. the source or build top-level directory, or edit `gcc/f/Make-lang.in'
  3357. and change the definition of the `F2CLIBOK' macro appropriately.
  3358. File: ^.!gcc.docs.fortran.g77,  Node: Patching GNU Fortran,  Next: Where to Install,  Prev: Installing f2c,  Up: Complete Installation
  3359. Patching GNU Fortran
  3360. --------------------
  3361.    If you're using a SunOS system, you'll need to make the following
  3362. change to `gcc/f/proj.h': edit the line reading
  3363.      #define FFEPROJ_STRTOUL 1  ...
  3364. by replacing the `1' with `0'.
  3365.    This causes a minimal version of `strtoul()' provided as part of the
  3366. `g77' distribution to be compiled and linked into whatever `g77'
  3367. programs need it, since some systems (like SunOS) do not provide this
  3368. function in their system libraries.
  3369.    Similarly, a minimal version of `bsearch()' is available and can be
  3370. enabled by editing a line similar to the one for `strtoul()' above in
  3371. `gcc/f/proj.h', if your system libraries lack `bsearch()'.
  3372.    These are not problems with `g77', which requires an ANSI C
  3373. environment.  You should upgrade your system to one that provides a
  3374. full ANSI C environment, or encourage the maintainers of `gcc' to
  3375. provide one to all `gcc'-based compilers in future `gcc' distributions.
  3376.    *Note Problems Installing::, for more information on why `strtoul()'
  3377. comes up missing and on approaches to dealing with this problem that
  3378. have already been tried.
  3379. File: ^.!gcc.docs.fortran.g77,  Node: Where to Install,  Next: Configuring gcc,  Prev: Patching GNU Fortran,  Up: Complete Installation
  3380. Where in the World Does Fortran (and GNU C) Go?
  3381. -----------------------------------------------
  3382.    Before configuring, you should make sure you know where you want the
  3383. `g77' and `gcc' binaries to be installed after they're built, because
  3384. this information is given to the configuration tool and used during the
  3385. build itself.
  3386.    A `g77' installation necessarily requires installation of a
  3387. `g77'-aware version of `gcc', so that the `gcc' command recognizes
  3388. Fortran source files and knows how to compile them.
  3389.    For this to work, the version of `gcc' that you will be building as
  3390. part of `g77' *must* be installed as the "active" version of `gcc' on
  3391. the system.
  3392.    Sometimes people make the mistake of installing `gcc' as
  3393. `/usr/local/bin/gcc', leaving an older, non-Fortran-aware version in
  3394. `/usr/bin/gcc'.  (Or, the opposite happens.) This can result in `g77'
  3395. being unable to compile Fortran source files, because when it calls on
  3396. `gcc' to do the actual compilation, `gcc' complains that it does not
  3397. recognize the language, or the file name suffix.
  3398.    So, determine whether `gcc' already is installed on your system,
  3399. and, if so, *where* it is installed, and prepare to configure the new
  3400. version of `gcc' you'll be building so that it installs over the
  3401. existing version of `gcc'.
  3402.    You might want to back up your existing copy of `bin/gcc', and the
  3403. entire `lib/' directory, before you perform the actual installation (as
  3404. described in this manual).
  3405.    Existing `gcc' installations typically are found in `/usr' or
  3406. `/usr/local'.  If you aren't certain where the currently installed
  3407. version of `gcc' and its related programs reside, look at the output of
  3408. this command:
  3409.      gcc -v -o /tmp/delete-me -xc /dev/null -xnone
  3410.    All sorts of interesting information on the locations of various
  3411. `gcc'-related programs and data files should be visible in the output
  3412. of the above command.  However, you do have to sift through it
  3413. yourself; `gcc' currently provides no easy way to ask it where it is
  3414. installed and where it looks for the various programs and data files it
  3415. calls on to do its work.
  3416.    Just *building* `g77' should not overwrite any installed
  3417. programs--but, usually, after you build `g77', you will want to install
  3418. it, so backing up anything it might overwrite is a good idea.  (This is
  3419. true for any package, not just `g77', though in this case it is
  3420. intentional that `g77' overwrites `gcc' if it is already installed--it
  3421. is unusual that the installation process for one distribution
  3422. intentionally overwrites a program or file installed by another
  3423. distribution.)
  3424.    Another reason to back up the existing version first, or make sure
  3425. you can restore it easily, is that it might be an older version on
  3426. which other users have come to depend for certain behaviors.  However,
  3427. even the new version of `gcc' you install will offer users the ability
  3428. to specify an older version of the actual compilation programs if
  3429. desired, and these older versions need not include any `g77' components.
  3430. *Note Specifying Target Machine and Compiler Version: (gcc)Target
  3431. Options, for information on the `-V' option of `gcc'.
  3432. File: ^.!gcc.docs.fortran.g77,  Node: Configuring gcc,  Next: Building gcc,  Prev: Where to Install,  Up: Complete Installation
  3433. Configuring GNU CC
  3434. ------------------
  3435.    `g77' is configured automatically when you configure `gcc'.  There
  3436. are two parts of `g77' that are configured in two different
  3437. ways--`g77', which "camps on" to the `gcc' configuration mechanism, and
  3438. `libf2c', which uses a variation of the GNU `autoconf' configuration
  3439. system.
  3440.    Generally, you shouldn't have to be concerned with either `g77' or
  3441. `libf2c' configuration, unless you're configuring `g77' as a
  3442. cross-compiler.  In this case, the `libf2c' configuration, and possibly
  3443. the `g77' and `gcc' configurations as well, might need special
  3444. attention.  (This also might be the case if you're porting `gcc' to a
  3445. whole new system--even if it is just a new operating system on an
  3446. existing, supported CPU.)
  3447.    To configure the system, see *Note Installing GNU CC:
  3448. (gcc)Installation, following the instructions for running `./configure'.
  3449. Pay special attention to the `--prefix=' option, which you almost
  3450. certainly will need to specify.
  3451.    (Note that `gcc' installation information is provided as a straight
  3452. text file in `gcc/INSTALL'.)
  3453.    The information printed by the invocation of `./configure' should
  3454. show that the `f' directory (the Fortran language) has been configured.
  3455. If it does not, there is a problem.
  3456.    *Note:* Configuring with the `--srcdir' argument is known to work
  3457. with GNU `make', but it is not known to work with other variants of
  3458. `make'.  Irix5.2 and SunOS4.1 versions of `make' definitely won't work
  3459. outside the source directory at present.  `g77''s portion of the
  3460. `configure' script issues a warning message about this when you
  3461. configure for building binaries outside the source directory.
  3462. File: ^.!gcc.docs.fortran.g77,  Node: Building gcc,  Next: Pre-installation Checks,  Prev: Configuring gcc,  Up: Complete Installation
  3463. Building GNU CC
  3464. ---------------
  3465.    Building `g77' requires building enough of `gcc' that these
  3466. instructions assume you're going to build all of `gcc', including
  3467. `g++', `protoize', and so on.  You can save a little time and disk
  3468. space by changes the `LANGUAGES' macro definition in `gcc/Makefile.in'
  3469. or `gcc/Makefile', but if you do that, you're on your own.  One change
  3470. is almost *certainly* going to cause failures: removing `c' or `f77'
  3471. from the definition of the `LANGUAGES' macro.
  3472.    After configuring `gcc', which configures `g77' and `libf2c'
  3473. automatically, you're ready to start the actual build by invoking
  3474. `make'.
  3475.    *Note:* You *must* have run `./configure' before you run `make',
  3476. even if you're using an already existing `gcc' development directory,
  3477. because `./configure' does the work to recognize that you've added
  3478. `g77' to the configuration.
  3479.    There are two general approaches to building GNU CC from scratch:
  3480. "bootstrap"
  3481.      This method uses minimal native system facilities to build a
  3482.      barebones, unoptimized `gcc', that is then used to compile
  3483.      ("bootstrap") the entire system.
  3484. "straight"
  3485.      This method assumes a more complete native system exists, and uses
  3486.      that just once to build the entire system.
  3487.    On all systems without a recent version of `gcc' already installed,
  3488. the bootstrap method must be used.  In particular, `g77' uses
  3489. extensions to the C language offered, apparently, only by `gcc'.
  3490.    On most systems with a recent version of `gcc' already installed,
  3491. the straight method can be used.  This is an advantage, because it
  3492. takes less CPU time and disk space for the build.  However, it does
  3493. require that the system have fairly recent versions of many GNU
  3494. programs and other programs, which are not enumerated here.
  3495. * Menu:
  3496. * Bootstrap Build::  For all systems.
  3497. * Straight Build::   For systems with a recent version of `gcc'.
  3498. File: ^.!gcc.docs.fortran.g77,  Node: Bootstrap Build,  Next: Straight Build,  Up: Building gcc
  3499. Bootstrap Build
  3500. ...............
  3501.    A complete bootstrap build is done by issuing a command beginning
  3502. with `make bootstrap ...', as described in *Note Installing GNU CC:
  3503. (gcc)Installation.  This is the most reliable form of build, but it
  3504. does require the most disk space and CPU time, since the complete system
  3505. is built twice (in Stages 2 and 3), after an initial build (during
  3506. Stage 1) of a minimal `gcc' compiler using the native compiler and
  3507. libraries.
  3508.    You might have to, or want to, control the way a bootstrap build is
  3509. done by entering the `make' commands to build each stage one at a time,
  3510. as described in the `gcc' manual.  For example, to save time or disk
  3511. space, you might want to not bother doing the Stage 3 build, in which
  3512. case you are assuming that the `gcc' compiler you have built is
  3513. basically sound (because you are giving up the opportunity to compare a
  3514. large number of object files to ensure they're identical).
  3515.    To save some disk space during installation, after Stage 2 is built,
  3516. you can type `rm -fr stage1' to remove the binaries built during Stage
  3517.    *Note:* If you do build Stage 3 and you compare the object files
  3518. produced by various stages, the file `gcc/f/zzz.o' *will* be different.
  3519. That is because it contains a string with an expansion of the
  3520. `__TIME__' macro, which expands to the current time of day.  It is
  3521. nothing to worry about, since `gcc/f/zzz.c' doesn't contain any actual
  3522. code.  It does allow you to override its use of `__DATE__' and
  3523. `__TIME__' by defining macros for the compilation--see the source code
  3524. for details.
  3525.    *Note Installing GNU CC: (gcc)Installation, for important
  3526. information on building `gcc' that is not described in this `g77'
  3527. manual.  For example, explanations of diagnostic messages and whether
  3528. they're expected, or indicate trouble, are found there.
  3529. File: ^.!gcc.docs.fortran.g77,  Node: Straight Build,  Prev: Bootstrap Build,  Up: Building gcc
  3530. Straight Build
  3531. ..............
  3532.    If you have a recent version of `gcc' already installed on your
  3533. system, and if you're reasonably certain it produces code that is
  3534. object-compatible with the version of `gcc' you want to build as part
  3535. of building `g77', you can save time and disk space by doing a straight
  3536. build.
  3537.    To build just the C and Fortran compilers and the necessary run-time
  3538. libraries, issue the following command:
  3539.      make -k CC=gcc LANGUAGES=f77 all g77
  3540.    (The `g77' target is necessary because the `gcc' build procedures
  3541. apparently do not automatically build command drivers for languages in
  3542. subdirectories.  It's the `all' target that triggers building
  3543. everything except, apparently, the `g77' command itself.)
  3544.    If you run into problems using this method, you have two options:
  3545.    * Abandon this approach and do a bootstrap build.
  3546.    * Try to make this approach work by diagnosing the problems you're
  3547.      running into and retrying.
  3548.    Especially if you do the latter, you might consider submitting any
  3549. solutions as bug/fix reports.  *Note Known Causes of Trouble with GNU
  3550. Fortran: Trouble.
  3551.    However, understand that many problems preventing a straight build
  3552. from working are not `g77' problems, and, in such cases, are not likely
  3553. to be addressed in future versions of `g77'.
  3554. File: ^.!gcc.docs.fortran.g77,  Node: Pre-installation Checks,  Next: Installation of Binaries,  Prev: Building gcc,  Up: Complete Installation
  3555. Pre-installation Checks
  3556. -----------------------
  3557.    Before installing the system, which includes installing `gcc', you
  3558. might want to do some minimum checking to ensure that some basic things
  3559. work.
  3560.    Here are some commands you can try, and output typically printed by
  3561. them when they work:
  3562.      sh# `cd /usr/src/gcc'
  3563.      sh# `./g77 --driver=./xgcc -B./ -v'
  3564.       ./xgcc -B./ -v -fnull-version -o /tmp/gfa03648 ...
  3565.      Reading specs from ./specs
  3566.      gcc version 2.7.1
  3567.       ./cpp -lang-c -v -isystem ./include -undef ...
  3568.      GNU CPP version 2.7.1 (80386, BSD syntax)
  3569.      #include "..." search starts here:
  3570.      #include <...> search starts here:
  3571.       ./include
  3572.       /usr/include
  3573.       /usr/i486-unknown-linuxaout/include
  3574.       /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include
  3575.       /usr/include
  3576.      End of search list.
  3577.       ./f771 /tmp/cca03648.i -quiet -dumpbase null.F -version ...
  3578.      GNU F77 version 2.7.1 (80386, BSD syntax) compiled ...
  3579.      GNU Fortran Front End version 0.5.18 compiled: ...
  3580.       as -o /tmp/cca036481.o /tmp/cca03648.s
  3581.       ld -m i386linux -o /tmp/gfa03648 /usr/lib/crt0.o -L. ...
  3582.      /usr/lib/crt0.o(.text+0x35): undefined reference to `main'
  3583.      sh# `./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone'
  3584.      Reading specs from ./specs
  3585.      gcc version 2.7.1
  3586.       ./cpp -lang-c -v -isystem ./include -undef ...
  3587.      GNU CPP version 2.7.1 (80386, BSD syntax)
  3588.      #include "..." search starts here:
  3589.      #include <...> search starts here:
  3590.       ./include
  3591.       /usr/include
  3592.       /usr/i486-unknown-linuxaout/include
  3593.       /usr/lib/gcc-lib/i486-unknown-linuxaout/2.7.1/include
  3594.       /usr/include
  3595.      End of search list.
  3596.       ./cc1 /tmp/cca03659.i -quiet -dumpbase null.c -version ...
  3597.      GNU C version 2.7.1 (80386, BSD syntax) compiled ...
  3598.       as -o /tmp/cca036591.o /tmp/cca03659.s
  3599.       ld -m i386linux -o /tmp/delete-me /usr/lib/crt0.o -L. ...
  3600.      /usr/lib/crt0.o(.text+0x35): undefined reference to `main'
  3601.      sh#
  3602.    (Note that long lines have been truncated, and `...' used to
  3603. indicate such truncations.)
  3604.    The above two commands test whether `g77' and `gcc', respectively,
  3605. are able to compile empty (null) source files, whether invocation of
  3606. the C preprocessor works, whether libraries can be linked (even though
  3607. there is an undefined reference due to there being no main program
  3608. unit), and so on.
  3609.    If the output you get from either of the above two commands is
  3610. noticably different, especially if it is shorter or longer in ways that
  3611. do not look consistent with the above sample output, you probably
  3612. should not install `gcc' and `g77' until you have investigated further.
  3613.    For example, you could try compiling actual applications and seeing
  3614. how that works.  (You might want to do that anyway, even if the above
  3615. tests work.)
  3616.    To compile using the not-yet-installed versions of `gcc' and `g77',
  3617. use the following commands to invoke them.
  3618.    To invoke `g77', type:
  3619.      /usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ ...
  3620.    To invoke `gcc', type:
  3621.      /usr/src/gcc/xgcc -B/usr/src/gcc/ ...
  3622. File: ^.!gcc.docs.fortran.g77,  Node: Installation of Binaries,  Next: Updating Documentation,  Prev: Pre-installation Checks,  Up: Complete Installation
  3623. Installation of Binaries
  3624. ------------------------
  3625.    After configuring, building, and testing `g77' and `gcc', when you
  3626. are ready to install them on your system, type:
  3627.      make -k CC=gcc LANGUAGES=f77 install
  3628.    As described in *Note Installing GNU CC: (gcc)Installation, the
  3629. values for the `CC' and `LANGUAGES' macros should be the same as those
  3630. you supplied for the build itself.
  3631.    So, the details of the above command might vary if you used a
  3632. bootstrap build (where you might be able to omit both definitions, or
  3633. might have to supply the same definitions you used when building the
  3634. final stage) or if you deviated from the instructions for a straight
  3635. build.
  3636.    If the above command does not install `libf2c.a' as expected, try
  3637. this:
  3638.      make -k ... install install-libf77 install-f2c-all
  3639.    We don't know why some non-GNU versions of `make' sometimes require
  3640. this alternate command, but they do.  (Remember to supply the
  3641. appropriate definitions for `CC' and `LANGUAGES' where you see `...' in
  3642. the above command.)
  3643.    Note that using the `-k' option tells `make' to continue after some
  3644. installation problems, like not having `makeinfo' installed on your
  3645. system.  It might not be necessary.
  3646. File: ^.!gcc.docs.fortran.g77,  Node: Updating Documentation,  Next: Missing bison?,  Prev: Installation of Binaries,  Up: Complete Installation
  3647. Updating Your Info Directory
  3648. ----------------------------
  3649.    As part of installing `g77', you should make sure users of `info'
  3650. can easily access this manual on-line.  Do this by making sure a line
  3651. such as the following exists in `/usr/info/dir', or in whatever file is
  3652. the top-level file in the `info' directory on your system (perhaps
  3653. `/usr/local/info/dir':
  3654.      * g77: (g77).           The GNU Fortran programming language.
  3655.    If the menu in `dir' is organized into sections, `g77' probably
  3656. belongs in a section with a name such as the following:
  3657.    * Writing Programs
  3658.    * Programming Languages
  3659.    * Languages Other Than C
  3660.    * Scientific/Engineering Tools
  3661.    * GNU Compilers
  3662. File: ^.!gcc.docs.fortran.g77,  Node: Missing bison?,  Next: Missing makeinfo?,  Prev: Updating Documentation,  Up: Complete Installation
  3663. Missing `bison'?
  3664. ----------------
  3665.    If you cannot install `bison', make sure you have started with a
  3666. *fresh* distribution of `gcc', do *not* do `make maintainer-clean' (in
  3667. other versions of `gcc', this was called `make realclean'), and, to
  3668. ensure that `bison' is not invoked by `make' during the build, type
  3669. these commands:
  3670.      sh# `cd gcc'
  3671.      sh# `touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c'
  3672.      sh# `touch cp/parse.c cp/parse.h objc-parse.c'
  3673.      sh#
  3674.    These commands update the date-time-modified information for all the
  3675. files produced by the various invocations of `bison' in the current
  3676. versions of `gcc', so that `make' no longer believes it needs to update
  3677. them.  All of these files should already exist in a `gcc' distribution,
  3678. but the application of patches to upgrade to a newer version can leave
  3679. the modification information set such that the `bison' input files look
  3680. more "recent" than the corresponding output files.
  3681.    *Note:* New versions of `gcc' might change the set of files it
  3682. generates by invoking `bison'--if you cannot figure out for yourself
  3683. how to handle such a situation, try an older version of `gcc' until you
  3684. find someone who can (or until you obtain and install `bison').
  3685. File: ^.!gcc.docs.fortran.g77,  Node: Missing makeinfo?,  Prev: Missing bison?,  Up: Complete Installation
  3686. Missing `makeinfo'?
  3687. -------------------
  3688.    If you cannot install `makeinfo', either use the `-k' option when
  3689. invoking make to specify any of the `install' or related targets, or
  3690. specify `MAKEINFO=echo' on the `make' command line.
  3691.    If you fail to do one of these things, some files, like `libf2c.a',
  3692. might not be installed, because the failed attempt by `make' to invoke
  3693. `makeinfo' causes it to cancel any further processing.
  3694. File: ^.!gcc.docs.fortran.g77,  Node: Distributing Binaries,  Next: Settings,  Prev: Complete Installation,  Up: Installation
  3695. Distributing Binaries
  3696. =====================
  3697.    If you are building `g77' for distribution to others in binary form,
  3698. first make sure you are aware of your legal responsibilities (read the
  3699. file `gcc/COPYING' thoroughly).
  3700.    Then, consider your target audience and decide where `g77' should be
  3701. installed.
  3702.    For systems like Linux that have no native Fortran compiler (or
  3703. where `g77' could be considered the native compiler for Fortran and
  3704. `gcc' for C, etc.), you should definitely configure `g77' for
  3705. installation in `/usr/bin' instead of `/usr/local/bin'.  Specify the
  3706. `--prefix=/usr' option when running `./configure'.  You might also want
  3707. to set up the distribution so the `f77' command is a link to
  3708. `g77'--just make an empty file named `f77-install-ok' in the source or
  3709. build directory (the one in which the `f' directory resides, not the
  3710. `f' directory itself) when you specify one of the `install' or
  3711. `uninstall' targets in a `make' command.
  3712.    For a system that might already have `f2c' installed, you definitely
  3713. will want to make another empty file (in the same directory) named
  3714. either `f2c-exists-ok' or `f2c-install-ok'.  Use the former if you
  3715. don't want your distribution to overwrite `f2c'-related files in
  3716. existing systems; use the latter if you want to improve the likelihood
  3717. that users will be able to use both `f2c' and `g77' to compile code for
  3718. a single program without encountering link-time or run-time
  3719. incompatibilities.
  3720.    (Make sure you clearly document, in the "advertising" for your
  3721. distribution, how installation of your distribution will affect
  3722. existing installations of `gcc', `f2c', `f77', `libf2c.a', and so on.
  3723. Similarly, you should clearly document any requirements you assume are
  3724. met by users of your distribution.)
  3725.    For other systems with native `f77' (and `cc') compilers, configure
  3726. `g77' as you (or most of your audience) would configure `gcc' for their
  3727. installations.  Typically this is for installation in `/usr/local', and
  3728. would not include a copy of `g77' named `f77', so users could still use
  3729. the native `f77'.
  3730.    In any case, for `g77' to work properly, you *must* ensure that the
  3731. binaries you distribute include:
  3732. `bin/g77'
  3733.      This is the command most users use to compile Fortran.
  3734. `bin/gcc'
  3735.      This is the command all users use to compile Fortran, either
  3736.      directly or indirectly via the `g77' command.  The `bin/gcc'
  3737.      executable file must have been built from a `gcc' source tree into
  3738.      which a `g77' source tree was merged and configured, or it will
  3739.      not know how to compile Fortran programs.
  3740. `bin/f77'
  3741.      In installations with no non-GNU native Fortran compiler, this is
  3742.      the same as `bin/g77'.  Otherwise, it should be omitted from the
  3743.      distribution, so the one on already on a particular system does
  3744.      not get overwritten.
  3745. `info/g77.info*'
  3746.      This is the documentation for `g77'.
  3747.      Please edit this documentation (by editing `gcc/f/*.texi' and
  3748.      doing `make doc' from the `/usr/src/gcc' directory) to reflect any
  3749.      changes you've made to `g77', or at least to encourage users of
  3750.      your binary distribution to report bugs to you first.
  3751.      Also, whether you distribute binaries or install `g77' on your own
  3752.      system, it might be helpful for everyone to add a line listing
  3753.      this manual by name and topic to the top-level `info' node in
  3754.      `/usr/info/dir'.  That way, users can find `g77' documentation more
  3755.      easily.  *Note Updating Your Info Directory: Updating
  3756.      Documentation.
  3757. `man/man1/g77.1'
  3758.      This is the short man page for `g77'.
  3759. `man/man1/f77.1'
  3760.      In installations where `f77' is the same as `g77', this is the
  3761.      same as `man/man1/g77.1'.  Otherwise, it should be omitted from
  3762.      the distribution, so the one already on a particular system does
  3763.      not get overwritten.
  3764. `lib/gcc-lib/.../f771'
  3765.      This is the actual Fortran compiler.
  3766. `lib/gcc-lib/.../libf2c.a'
  3767.      This is the run-time library for `g77'-compiled programs.
  3768.    Whether you want to include the slightly updated (and possibly
  3769. improved) versions of `cc1', `cc1plus', and whatever other binaries get
  3770. rebuilt with the changes the GNU Fortran distribution makes to the GNU
  3771. back end, is up to you.  These changes are highly unlikely to break any
  3772. compilers, and it is possible they'll fix back-end bugs that can be
  3773. demonstrated using front ends other than GNU Fortran's.
  3774.    Please assure users that unless they have a specific need for their
  3775. existing, older versions of `gcc' command, they are unlikely to
  3776. experience any problems by overwriting it with your version--though
  3777. they could certainly protect themselves by making backup copies first!
  3778. Otherwise, users might try and install your binaries in a "safe" place,
  3779. find they cannot compile Fortran programs with your distribution
  3780. (because, perhaps, they're picking up their old version of the `gcc'
  3781. command, which does not recognize Fortran programs), and assume that
  3782. your binaries (or, more generally, GNU Fortran distributions in
  3783. general) are broken, at least for their system.
  3784.    Finally, *please* ask for bug reports to go to you first, at least
  3785. until you're sure your distribution is widely used and has been well
  3786. tested.  This especially goes for those of you making any changes to
  3787. the `g77' sources to port `g77', e.g. to OS/2.
  3788. `fortran@gnu.ai.mit.edu' has received a fair amount of bug reports that
  3789. turned out to be problems with other peoples' ports and distributions,
  3790. about which nothing could be done for the user.  Once you are quite
  3791. certain a bug report does not involve your efforts, you can forward it
  3792. to us.
  3793. File: ^.!gcc.docs.fortran.g77,  Node: Settings,  Prev: Distributing Binaries,  Up: Installation
  3794. Changing Settings Before Building
  3795. =================================
  3796.    Here are some internal `g77' settings that can be changed by editing
  3797. source files in `gcc/f/' before building.
  3798.    This information, and perhaps even these settings, represent
  3799. stop-gap solutions to problems people doing various ports of `g77' have
  3800. encountered.  As such, none of the following information is expected to
  3801. be pertinent in future versions of `g77'.
  3802. * Menu:
  3803. * Maximum Stackable Size::       Large arrays are forced off the stack frame.
  3804. * Floating-point Bit Patterns::  Possible programs building cross-compiler.
  3805. * Large Initialization::         Large arrays with `DATA' initialization.
  3806. * Alpha Problems::               Problems with 64-bit systems like Alphas.
  3807. File: ^.!gcc.docs.fortran.g77,  Node: Maximum Stackable Size,  Next: Floating-point Bit Patterns,  Up: Settings
  3808. Maximum Stackable Size
  3809. ----------------------
  3810.    `g77', on most machines, puts many variables and arrays on the stack
  3811. where possible, and can be configured (by changing
  3812. `FFECOM_sizeMAXSTACKITEM' in `gcc/f/com.c') to force smaller-sized
  3813. entities into static storage (saving on stack space) or permit
  3814. larger-sized entities to be put on the stack (which can improve
  3815. run-time performance, as it presents more opportunities for the GBE to
  3816. optimize the generated code).
  3817. File: ^.!gcc.docs.fortran.g77,  Node: Floating-point Bit Patterns,  Next: Large Initialization,  Prev: Maximum Stackable Size,  Up: Settings
  3818. Floating-point Bit Patterns
  3819. ---------------------------
  3820.    The `g77' build will crash if an attempt is made to build it as a
  3821. cross-compiler for a target when `g77' cannot reliably determine the
  3822. bit pattern of floating-point constants for the target.  Planned
  3823. improvements for g77-0.6 will give it the capabilities it needs to not
  3824. have to crash the build but rather generate correct code for the target.
  3825. (Currently, `g77' would generate bad code under such circumstances if
  3826. it didn't crash during the build, e.g. when compiling a source file
  3827. that does something like `EQUIVALENCE (I,R)' and `DATA
  3828. R/3.1415926535/'.)
  3829. File: ^.!gcc.docs.fortran.g77,  Node: Large Initialization,  Next: Alpha Problems,  Prev: Floating-point Bit Patterns,  Up: Settings
  3830. Initialization of Large Aggregate Areas
  3831. ---------------------------------------
  3832.    A warning message is issued when `g77' sees code that provides
  3833. initial values (e.g. via `DATA') to an aggregate area (`COMMON' or
  3834. `EQUIVALENCE', or even a large enough array or `CHARACTER' variable)
  3835. that is large enough to increase `g77''s compile time by roughly a
  3836. factor of 10.
  3837.    This size currently is quite small, since `g77' currently has a
  3838. known bug requiring too much memory and time to handle such cases.  In
  3839. `gcc/f/data.c', the macro `FFEDATA_sizeTOO_BIG_INIT_' is defined to the
  3840. minimum size for the warning to appear.  The size is specified in
  3841. storage units, which can be bytes, words, or whatever, on a
  3842. case-by-case basis.
  3843.    After changing this macro definition, you must (of course) rebuild
  3844. and reinstall `g77' for the change to take effect.
  3845.    Note that, as of version 0.5.18, improvements have reduced the scope
  3846. of the problem for *sparse* initialization of large arrays, especially
  3847. those with large, contiguous uninitialized areas.  However, the warning
  3848. is issued at a point prior to when `g77' knows whether the
  3849. initialization is sparse, and delaying the warning could mean it is
  3850. produced too late to be helpful.
  3851.    Therefore, the macro definition should not be adjusted to reflect
  3852. sparse cases.  Instead, adjust it to generate the warning when densely
  3853. initialized arrays begin to cause responses noticably slower than
  3854. linear performance would suggest.
  3855. File: ^.!gcc.docs.fortran.g77,  Node: Alpha Problems,  Prev: Large Initialization,  Up: Settings
  3856. Alpha Problems
  3857. --------------
  3858.    `g77' might warn when it is used to compile Fortran code for a
  3859. target configuration that is not basically a 32-bit machine (such as an
  3860. Alpha, which is a 64-bit machine, especially if it has a 64-bit
  3861. operating system running on it).  This is because `g77' is known to not
  3862. work properly on such configurations, although the reasons for this are
  3863. not fully explored.  This is expected to be fixed at 0.6, at which
  3864. point the warning would be dropped.  (The reason the unexplored
  3865. problems are expected to be fixed at 0.6 is because some known internal
  3866. design problems `g77' has, which reduce portability and the ability to
  3867. configure it as a cross-compiler, are presumed to be at least partly
  3868. responsible for the problems being encountered on the Alpha.  The
  3869. problems remain unexplored partly because the known problems exist and
  3870. are scheduled to be addressed anyway.  Plus, the `g77' maintainer does
  3871. not yet possess an Alpha workstation of his own.)
  3872. File: ^.!gcc.docs.fortran.g77,  Node: Debugging and Interfacing,  Next: Collected Fortran Wisdom,  Prev: Installation,  Up: Top
  3873. Debugging and Interfacing
  3874. *************************
  3875.    GNU Fortran currently generates code that is object-compatible with
  3876. the `f2c' converter.  Also, it avoids limitations in the current GBE,
  3877. such as the inability to generate a procedure with multiple entry
  3878. points, by generating code that is structured differently (in terms of
  3879. procedure names, scopes, arguments, and so on) than might be expected.
  3880.    As a result, writing code in other languages that calls on, is
  3881. called by, or shares in-memory data with `g77'-compiled code generally
  3882. requires some understanding of the way `g77' compiles code for various
  3883. constructs.
  3884.    Similarly, using a debugger to debug `g77'-compiled code, even if
  3885. that debugger supports native Fortran debugging, generally requires
  3886. this sort of information.
  3887.    This section describes some of the basic information on how `g77'
  3888. compiles code for constructs involving interfaces to other languages
  3889. and to debuggers.
  3890.    *Caution:* Much or all of this information pertains to only the
  3891. current release of `g77', sometimes even to using certain compiler
  3892. options with `g77' (such as `-fno-f2c').  Do not write code that
  3893. depends on this information without clearly marking said code as
  3894. nonportable and subject to review for every new release of `g77'.  This
  3895. information is provided primarily to make debugging of code generated
  3896. by this particular release of `g77' easier for the user, and partly to
  3897. make writing (generally nonportable) interface code easier.  Both of
  3898. these activities require tracking changes in new version of `g77' as
  3899. they are installed, because new versions can change the behaviors
  3900. described in this section.
  3901. * Menu:
  3902. * Names::              Naming of user-defined variables, procedures, etc.
  3903. * Main Program Unit::  How `g77' compiles a main program unit.
  3904. * Arrays::             Dealing with (possibly multi-dimensional) arrays.
  3905. * Procedures::         How `g77' constructs parameter lists
  3906.                        for procedures.
  3907. * Adjustable Arrays::  Special consideration for adjustable arrays.
  3908. * Alternate Returns::  How `g77' handles alternate returns.
  3909. * Functions::          Functions returning floating-point or character data.
  3910. * Common Blocks::      Accessing common variables while debugging.
  3911. * Local Equivalence Areas::  Accessing `EQUIVALENCE' while debugging.
  3912. * Alternate Entry Points::  How `g77' implements alternate `ENTRY'.
  3913. * Assigned Statement Labels::  How `g77' handles `ASSIGN'.
  3914. File: ^.!gcc.docs.fortran.g77,  Node: Names,  Next: Main Program Unit,  Up: Debugging and Interfacing
  3915. Names
  3916. =====
  3917.    Fortran permits each implementation to decide how to represent names
  3918. as far as how they're seen in other contexts, such as debuggers and
  3919. when interfacing to other languages, and especially as far as how
  3920. casing is handled.
  3921.    External names--names of entities that are public, or "accessible",
  3922. to all modules in a program--normally have an underscore (`_') appended
  3923. by `g77', to generate code that is compatible with f2c.  External names
  3924. include names of Fortran things like common blocks, external procedures
  3925. (subroutines and functions, but not including statement functions,
  3926. which are internal procedures), and entry point names.
  3927.    However, use of the `-fno-underscoring' option disables this kind of
  3928. transformation of external names (though inhibiting the transformation
  3929. certainly improves the chances of colliding with incompatible externals
  3930. written in other languages--but that might be intentional.
  3931.    When `-funderscoring' is in force, any name (external or local) that
  3932. already has at least one underscore in it is implemented by `g77' by
  3933. appending two underscores.  External names are changed this way for
  3934. `f2c' compatibility.  Local names are changed this way to avoid
  3935. collisions with external names that are different in the source
  3936. code--`f2c' does the same thing, but there's no compatibility issue
  3937. there except for user expectations while debugging.
  3938.    For example:
  3939.      Max_Cost = 0
  3940. Here, a user would, in the debugger, refer to this variable using the
  3941. name `max_cost__' (or `MAX_COST__' or `Max_Cost__', as described below).
  3942. (We hope to improve `g77' in this regard in the future--don't write
  3943. scripts depending on this behavior!  Also, consider experimenting with
  3944. the `-fno-underscoring' option to try out debugging without having to
  3945. massage names by hand like this.)
  3946.    `g77' provides a number of command-line options that allow the user
  3947. to control how case mapping is handled for source files.  The default
  3948. is the traditional UNIX model for Fortran compilers--names are mapped
  3949. to lower case.  Other command-line options can be specified to map
  3950. names to upper case, or to leave them exactly as written in the source
  3951. file.
  3952.    For example:
  3953.      Foo = 3.14159
  3954. Here, it is normally the case that the variable assigned will be named
  3955. `foo'.  This would be the name to enter when using a debugger to access
  3956. the variable.
  3957.    However, depending on the command-line options specified, the name
  3958. implemented by `g77' might instead be `FOO' or even `Foo', thus
  3959. affecting how debugging is done.
  3960.    Also:
  3961.      Call Foo
  3962. This would normally call a procedure that, if it were in a separate C
  3963. program, be defined starting with the line:
  3964.      void foo_()
  3965. However, `g77' command-line options could be used to change the casing
  3966. of names, resulting in the name `FOO_' or `Foo_' being given to the
  3967. procedure instead of `foo_', and the `-fno-underscoring' option could
  3968. be used to inhibit the appending of the underscore to the name.
  3969. File: ^.!gcc.docs.fortran.g77,  Node: Main Program Unit,  Next: Arrays,  Prev: Names,  Up: Debugging and Interfacing
  3970. Main Program Unit (PROGRAM)
  3971. ===========================
  3972.    When `g77' compiles a main program unit, it gives it the public
  3973. procedure name `MAIN__'.  The `libf2c' library has the actual `main()'
  3974. procedure as is typical of C-based environments, and it is this
  3975. procedure that performs some initial start-up activity and then calls
  3976. `MAIN__'.
  3977.    Generally, `g77' and `libf2c' are designed so that you need not
  3978. include a main program unit written in Fortran in your program--it can
  3979. be written in C or some other language.  Especially for I/O handling,
  3980. this is the case, although `g77-0.5.16' includes a bug fix for `libf2c'
  3981. that solved a problem with using the `OPEN' statement as the first
  3982. Fortran I/O activity in a program without a Fortran main program unit.
  3983.    However, if you don't intend to use `g77' (or `f2c') to compile your
  3984. main program unit--that is, if you intend to compile a `main()'
  3985. procedure using some other language--you should carefully examine the
  3986. code for `main()' in `libf2c', found in the source file
  3987. `gcc/f/runtime/libF77/main.c', to see what kinds of things might need
  3988. to be done by your `main()' in order to provide the Fortran environment
  3989. your Fortran code is expecting.
  3990.    For example, `libf2c''s `main()' sets up the information used by the
  3991. `IARGC' and `GETARG' intrinsics.  Bypassing `libf2c''s `main()' without
  3992. providing a substitute for this activity would mean that invoking
  3993. `IARGC' and `GETARG' would produce undefined results.
  3994.    When debugging, one implication of the fact that `main()', which is
  3995. the place where the debugged program "starts" from the debugger's point
  3996. of view, is in `libf2c' is that you won't be starting your Fortran
  3997. program at a point you recognize as your Fortran code.
  3998.    The standard way to get around this problem is to set a break point
  3999. (a one-time, or temporary, break point will do) at the entrance to
  4000. `MAIN__', and then run the program.
  4001.    After doing this, the debugger will see the current execution point
  4002. of the program as at the beginning of the main program unit of your
  4003. program.
  4004.    Of course, if you really want to set a break point at some other
  4005. place in your program and just start the program running, without first
  4006. breaking at `MAIN__', that should work fine.
  4007. File: ^.!gcc.docs.fortran.g77,  Node: Arrays,  Next: Procedures,  Prev: Main Program Unit,  Up: Debugging and Interfacing
  4008. Arrays (DIMENSION)
  4009. ==================
  4010.    Fortran uses "column-major ordering" in its arrays.  This differs
  4011. from other languages, such as C, which use "row-major ordering".  The
  4012. difference is that, with Fortran, array elements adjacent to each other
  4013. in memory differ in the *first* subscript instead of the last;
  4014. `A(5,10,20)' immediately follows `A(4,10,20)', whereas with row-major
  4015. ordering it would follow `A(5,10,19)'.
  4016.    This consideration affects not only interfacing with and debugging
  4017. Fortran code, it can greatly affect how code is designed and written,
  4018. especially when code speed and size is a concern.
  4019.    Fortran also differs from C, a popular language for interfacing and
  4020. to support directly in debuggers, in the way arrays are treated.  In C,
  4021. arrays are single-dimensional and have interesting relationships to
  4022. pointers, neither of which is true for Fortran.  As a result, dealing
  4023. with Fortran arrays from within an environment limited to C concepts
  4024. can be challenging.
  4025.    For example, accessing the array element `A(5,10,20)' is easy enough
  4026. in Fortran (use `A(5,10,20)'), but in C some difficult machinations are
  4027. needed.  First, C would treat the A array as a single-dimension array.
  4028. Second, C does not understand low bounds for arrays as does Fortran.
  4029. Third, C assumes a low bound of zero (0), while Fortran defaults to a
  4030. low bound of one (1) and can supports an arbitrary low bound.
  4031. Therefore, calculations must be done to determine what the C equivalent
  4032. of `A(5,10,20)' would be, and these calculations require knowing the
  4033. dimensions of `A'.
  4034.    For `DIMENSION A(2:11,21,0:29)', the calculation of the offset of
  4035. `A(5,10,20)' would be:
  4036.        (5-2)
  4037.      + (10-1)*(11-2+1)
  4038.      + (20-0)*(11-2+1)*(21-1+1)
  4039.      = 4293
  4040. So the C equivalent in this case would be `a[4293]'.
  4041.    When using a debugger directly on Fortran code, the C equivalent
  4042. might not work, because some debuggers cannot understand the notion of
  4043. low bounds other than zero.  However, unlike `f2c', `g77' does inform
  4044. the GBE that a multi-dimensional array (like `A' in the above example)
  4045. is really multi-dimensional, rather than a single-dimensional array, so
  4046. at least the dimensionality of the array is preserved.
  4047.    Debuggers that understand Fortran should have no trouble with
  4048. non-zero low bounds, but for non-Fortran debuggers, especially C
  4049. debuggers, the above example might have a C equivalent of `a[4305]'.
  4050. This calculation is arrived at by eliminating the subtraction of the
  4051. lower bound in the first parenthesized expression on each line--that
  4052. is, for `(5-2)' substitute `(5)', for `(10-1)' substitute `(10)', and
  4053. for `(20-0)' substitute `(20)'.  Actually, the implication of this can
  4054. be that the expression `*(&a[2][1][0] + 4293)' works fine, but that
  4055. `a[20][10][5]' produces the equivalent of `*(&a[0][0][0] + 4305)'
  4056. because of the missing lower bounds.
  4057.    Come to think of it, perhaps the behavior is due to the debugger
  4058. internally compensating for the lower bounds by offsetting the base
  4059. address of `a', leaving `&a' set lower, in this case, than
  4060. `&a[2][1][0]' (the address of its first element as identified by
  4061. subscripts equal to the corresponding lower bounds).
  4062.    You know, maybe nobody really needs to use arrays.
  4063. File: ^.!gcc.docs.fortran.g77,  Node: Procedures,  Next: Adjustable Arrays,  Prev: Arrays,  Up: Debugging and Interfacing
  4064. Procedures (SUBROUTINE and FUNCTION)
  4065. ====================================
  4066.    Procedures that accept `CHARACTER' arguments are implemented by
  4067. `g77' so that each `CHARACTER' argument has two actual arguments.
  4068.    The first argument occupies the expected position in the argument
  4069. list and has the user-specified name.  This argument is a pointer to an
  4070. array of characters, passed by the caller.
  4071.    The second argument is appended to the end of the user-specified
  4072. calling sequence and is named `__g77_length_X', where X is the
  4073. user-specified name.  This argument is of the C type `ftnlen' (see
  4074. `gcc/f/runtime/f2c.h.in' for information on that type) and is the
  4075. number of characters the caller has allocated in the array pointed to
  4076. by the first argument.
  4077.    A procedure will ignore the length argument if `X' is not declared
  4078. `CHARACTER*(*)', because for other declarations, it knows the length.
  4079. Not all callers necessarily "know" this, however, which is why they all
  4080. pass the extra argument.
  4081.    The contents of the `CHARACTER' argument are specified by the
  4082. address passed in the first argument (named after it).  The procedure
  4083. can read or write these contents as appropriate.
  4084.    When more than one `CHARACTER' argument is present in the argument
  4085. list, the length arguments are appended in the order the orginal
  4086. arguments appear.  So `CALL FOO('HI','THERE')' is implemented in C as
  4087. `foo("hi","there",2,5);', ignoring the fact that `g77' does not provide
  4088. the trailing null bytes on the constant strings (`f2c' does provide
  4089. them, but they are unnecessary in a Fortran environment, and you should
  4090. not expect them to be there).
  4091.    Note that the above information applies to `CHARACTER' variables and
  4092. arrays *only*.  It does *not* apply to external `CHARACTER' functions
  4093. or to intrinsic `CHARACTER' functions.  That is, no second length
  4094. argument is passed to `FOO' in this case:
  4095.      CHARACTER X
  4096.      EXTERNAL X
  4097.      CALL FOO(X)
  4098. Nor does `FOO' expect such an argument in this case:
  4099.      SUBROUTINE FOO(X)
  4100.      CHARACTER X
  4101.      EXTERNAL X
  4102.    Because of this implementation detail, if a program has a bug such
  4103. that there is disagreement as to whether an argument is a procedure,
  4104. and the type of the argument is `CHARACTER', subtle symptoms might
  4105. appear.
  4106. File: ^.!gcc.docs.fortran.g77,  Node: Adjustable Arrays,  Next: Alternate Returns,  Prev: Procedures,  Up: Debugging and Interfacing
  4107. Adjustable Arrays (DIMENSION)
  4108. =============================
  4109.    Adjustable and automatic arrays in Fortran require the implementation
  4110. (in this case, the `g77' compiler) to "memorize" the expressions that
  4111. dimension the arrays each time the procedure is invoked.  This is so
  4112. that subsequent changes to variables used in those expressions, made
  4113. during execution of the procedure, do not have any effect on the
  4114. dimensions of those arrays.
  4115.    For example:
  4116.      REAL ARRAY(5)
  4117.      DATA ARRAY/5*2/
  4118.      CALL X(ARRAY, 5)
  4119.      END
  4120.      SUBROUTINE X(A, N)
  4121.      DIMENSION A(N)
  4122.      N = 20
  4123.      PRINT *, N, A
  4124.      END
  4125. Here, the implementation should, when running the program, print
  4126. something like:
  4127.      20   2.  2.  2.  2.  2.
  4128. Note that this shows that while the value of `N' was successfully
  4129. changed, the size of the `A' array remained at 5 elements.
  4130.    To support this, `g77' generates code that executes before any user
  4131. code (and before the internally generated computed `GOTO' to handle
  4132. alternate entry points, as described below) that evaluates each
  4133. (nonconstant) expression in the list of subscripts for an array, and
  4134. saves the result of each such evaluation to be used when determining
  4135. the size of the array (instead of re-evaluating the expressions).
  4136.    So, in the above example, when `X' is first invoked, code is
  4137. executed that copies the value of `N' to a temporary.  And that same
  4138. temporary serves as the actual high bound for the single dimension of
  4139. the `A' array (the low bound being the constant 1).  Since the user
  4140. program cannot (legitimately) change the value of the temporary during
  4141. execution of the procedure, the size of the array remains constant
  4142. during each invocation.
  4143.    For alternate entry points, the code `g77' generates takes into
  4144. account the possibility that a dummy adjustable array is not actually
  4145. passed to the actual entry point being invoked at that time.  In that
  4146. case, the public procedure implementing the entry point passes to the
  4147. master private procedure implementing all the code for the entry points
  4148. a `NULL' pointer where a pointer to that adjustable array would be
  4149. expected.  The `g77'-generated code doesn't attempt to evaluate any of
  4150. the expressions in the subscripts for an array if the pointer to that
  4151. array is `NULL' at run time in such cases.  (Don't depend on this
  4152. particular implementation by writing code that purposely passes `NULL'
  4153. pointers where the callee expects adjustable arrays, even if you know
  4154. the callee won't reference the arrays--nor should you pass `NULL'
  4155. pointers for any dummy arguments used in calculating the bounds of such
  4156. arrays or leave undefined any values used for that purpose in
  4157. COMMON--because the way `g77' implements these things might change in
  4158. the future!)
  4159. File: ^.!gcc.docs.fortran.g77,  Node: Alternate Returns,  Next: Functions,  Prev: Adjustable Arrays,  Up: Debugging and Interfacing
  4160. Alternate Returns (SUBROUTINE and RETURN)
  4161. =========================================
  4162.    Subroutines with alternate returns (e.g. `SUBROUTINE X(*)' and `CALL
  4163. X(*50)') are implemented by `g77' as functions returning the C `int'
  4164. type.  The actual alternate-return arguments are omitted from the
  4165. calling sequence.  Instead, the caller uses the return value to do a
  4166. rough equivalent of the Fortran computed-`GOTO' statement, as in `GOTO
  4167. (50), X()' in the example above (where `X' is quietly declared as an
  4168. `INTEGER' function), and the callee just returns whatever integer is
  4169. specified in the `RETURN' statement for the subroutine For example,
  4170. `RETURN 1' is implemented as `X = 1' followed by `RETURN' in C, and
  4171. `RETURN' by itself is `X = 0' and `RETURN').
  4172. File: ^.!gcc.docs.fortran.g77,  Node: Functions,  Next: Common Blocks,  Prev: Alternate Returns,  Up: Debugging and Interfacing
  4173. Functions (FUNCTION and RETURN)
  4174. ===============================
  4175.    `g77' handles in a special way functions that return the following
  4176. types:
  4177.    * `CHARACTER'
  4178.    * `COMPLEX' (and `DOUBLE COMPLEX')
  4179.    * `REAL'
  4180.    For `CHARACTER', `g77' implements a subroutine (a C function
  4181. returning `void') with two arguments prepended: `__g77_result', which
  4182. the caller passes as a pointer to a `char' array expected to hold the
  4183. return value, and `__g77_length', which the caller passes as an
  4184. `ftnlen' value specifying the length of the return value as declared in
  4185. the calling program.  For `CHARACTER'*(*), the called function uses
  4186. `__g77_length' to determine the size of the array that `__g77_result'
  4187. points to; otherwise, it ignores that argument.
  4188.    For `COMPLEX' and `DOUBLE COMPLEX', when `-ff2c' is in force, `g77'
  4189. implements a subroutine with one argument prepended: `__g77_result',
  4190. which the caller passes as a pointer to a variable of the type of the
  4191. function.  The called function writes the return value into this
  4192. variable instead of returning it as a function value.  When `-fno-f2c'
  4193. is in force, `g77' implements a `COMPLEX' function as `gcc''s
  4194. `__complex__ float' function, returning the result of the function in
  4195. the same way as `gcc' would, and implements a `DOUBLE COMPLEX' function
  4196. similarly.
  4197.    For `REAL', when `-ff2c' is in force, `g77' implements a function
  4198. that actually returns `DOUBLE PRECISION' (usually C's `double' type).
  4199. When `-fno-f2c' is in force, `REAL' functions return `float'.
  4200. File: ^.!gcc.docs.fortran.g77,  Node: Common Blocks,  Next: Local Equivalence Areas,  Prev: Functions,  Up: Debugging and Interfacing
  4201. Common Blocks (COMMON)
  4202. ======================
  4203.    `g77' names and lays out `COMMON' areas the same way f2c does, for
  4204. compatibility with f2c.
  4205.    Currently, `g77' does not emit any debugging information for items
  4206. in a `COMMON' area, due to an apparent bug in the GBE.
  4207.    Moreover, `g77' currently implements a `COMMON' area such that its
  4208. type is an array of the C `char' data type.
  4209.    So, when debugging, you must know the offset into a `COMMON' area
  4210. for a particular item in that area, and you have to take into account
  4211. the appropriate multiplier for the respective sizes of the types (as
  4212. declared in your code) for the items preceding the item in question as
  4213. compared to the size of the `char' type.
  4214.    For example, using default implicit typing, the statement
  4215.      COMMON I(15), R(20), T
  4216. results in a public 144-byte `char' array named `_BLNK__' with `I'
  4217. placed at `_BLNK__[0]', `R' at `_BLNK__[60]', and `T' at `_BLNK__[140]'.
  4218. (This is assuming that the target machine for the compilation has
  4219. 4-byte `INTEGER' and `REAL' types.)
  4220. File: ^.!gcc.docs.fortran.g77,  Node: Local Equivalence Areas,  Next: Alternate Entry Points,  Prev: Common Blocks,  Up: Debugging and Interfacing
  4221. Local Equivalence Areas (EQUIVALENCE)
  4222. =====================================
  4223.    `g77' treats storage-associated areas involving a `COMMON' block as
  4224. explained in the section on common blocks.
  4225.    A local `EQUIVALENCE' area is a collection of variables and arrays
  4226. connected to each other in any way via `EQUIVALENCE', none of which are
  4227. listed in a `COMMON' statement.
  4228.    Currently, `g77' does not emit any debugging information for items
  4229. in a local `EQUIVALENCE' area, due to an apparent bug in the GBE.
  4230.    Moreover, `g77' implements a local `EQUIVALENCE' area such that its
  4231. type is an array of the C `char' data type.
  4232.    The name `g77' gives this array of `char' type is `__g77_equiv_X',
  4233. where X is the name of the first item listed in the `EQUIVALENCE'
  4234. statements for that area that is placed at the beginning (offset 0) of
  4235. this array.
  4236.    When debugging, you must therefore access members of `EQUIVALENCE'
  4237. areas by specifying the appropriate `__g77_equiv_X' array section with
  4238. the appropriate offset.  See the explanation of debugging `COMMON'
  4239. blocks for info applicable to debugging local `EQUIVALENCE' areas.
  4240.    (Note: `g77' version 0.5.16 fixed a bug in how certain `EQUIVALENCE'
  4241. cases were handled.  The bug caused the debugger to not know the size
  4242. of the array if any variable or array in the `EQUIVALENCE' was given an
  4243. initial value via `DATA' or similar.)
  4244. File: ^.!gcc.docs.fortran.g77,  Node: Alternate Entry Points,  Next: Assigned Statement Labels,  Prev: Local Equivalence Areas,  Up: Debugging and Interfacing
  4245. Alternate Entry Points (ENTRY)
  4246. ==============================
  4247.    The GBE does not understand the general concept of alternate entry
  4248. points as Fortran provides via the ENTRY statement.  `g77' gets around
  4249. this by using an approach to compiling procedures having at least one
  4250. `ENTRY' statement that is almost identical to the approach used by
  4251. `f2c'.  (An alternate approach could be used that would probably
  4252. generate faster, but larger, code that would also be a bit easier to
  4253. debug.)
  4254.    Information on how `g77' implements `ENTRY' is provided for those
  4255. trying to debug such code.  The choice of implementation seems unlikely
  4256. to affect code (compiled in other languages) that interfaces to such
  4257. code.
  4258.    `g77' compiles exactly one public procedure for the primary entry
  4259. point of a procedure plus each `ENTRY' point it specifies, as usual.
  4260. That is, in terms of the public interface, there is no difference
  4261. between
  4262.      SUBROUTINE X
  4263.      END
  4264.      SUBROUTINE Y
  4265.      END
  4266.      SUBROUTINE X
  4267.      ENTRY Y
  4268.      END
  4269.    The difference between the above two cases lies in the code compiled
  4270. for the `X' and `Y' procedures themselves, plus the fact that, for the
  4271. second case, an extra internal procedure is compiled.
  4272.    For every Fortran procedure with at least one `ENTRY' statement,
  4273. `g77' compiles an extra procedure named `__g77_masterfun_X', where X is
  4274. the name of the primary entry point (which, in the above case, using
  4275. the standard compiler options, would be `x_' in C).
  4276.    This extra procedure is compiled as a private procedure--that is, a
  4277. procedure not accessible by name to separately compiled modules.  It
  4278. contains all the code in the program unit, including the code for the
  4279. primary entry point plus for every entry point.  (The code for each
  4280. public procedure is quite short, and explained later.)
  4281.    The extra procedure has some other interesting characteristics.
  4282.    The argument list for this procedure is invented by `g77'.  It
  4283. contains a single integer argument named `__g77_which_entrypoint',
  4284. passed by value (as in Fortran's `%VAL()' intrinsic), specifying the
  4285. entry point index--0 for the primary entry point, 1 for the first entry
  4286. point (the first `ENTRY' statement encountered), 2 for the second entry
  4287. point, and so on.
  4288.    It also contains, for functions returning `CHARACTER' and (when
  4289. `-ff2c' is in effect) `COMPLEX' functions, and for functions returning
  4290. different types among the `ENTRY' statements (e.g. `REAL FUNCTION R()'
  4291. containing `ENTRY I()'), an argument named `__g77_result' that is
  4292. expected at run time to contain a pointer to where to store the result
  4293. of the entry point.  For `CHARACTER' functions, this storage area is an
  4294. array of the appropriate number of characters; for `COMPLEX' functions,
  4295. it is the appropriate area for the return type (currently either
  4296. `COMPLEX' or `DOUBLE COMPLEX'); for multiple- return-type functions, it
  4297. is a union of all the supported return types (which cannot include
  4298. `CHARACTER', since combining `CHARACTER' and non-`CHARACTER' return
  4299. types via `ENTRY' in a single function is not supported by `g77').
  4300.    For `CHARACTER' functions, the `__g77_result' argument is followed
  4301. by yet another argument named `__g77_length' that, at run time,
  4302. specifies the caller's expected length of the returned value.  Note
  4303. that only `CHARACTER*(*)' functions and entry points actually make use
  4304. of this argument, even though it is always passed by all callers of
  4305. public `CHARACTER' functions (since the caller does not generally know
  4306. whether such a function is `CHARACTER*(*)' or whether there are any
  4307. other callers that don't have that information).
  4308.    The rest of the argument list is the union of all the arguments
  4309. specified for all the entry points (in their usual forms, e.g.
  4310. `CHARACTER' arguments have extra length arguments, all appended at the
  4311. end of this list).  This is considered the "master list" of arguments.
  4312.    The code for this procedure has, before the code for the first
  4313. executable statement, code much like that for the following Fortran
  4314. statement:
  4315.             GOTO (100000,100001,100002), __g77_which_entrypoint
  4316.      100000 ...code for primary entry point...
  4317.      100001 ...code immediately following first ENTRY statement...
  4318.      100002 ...code immediately following second ENTRY statement...
  4319. (Note that invalid Fortran statement labels and variable names are used
  4320. in the above example to highlight the fact that it represents code
  4321. generated by the `g77' internals, not code to be written by the user.)
  4322.    It is this code that, when the procedure is called, picks which
  4323. entry point to start executing.
  4324.    Getting back to the public procedures (`x' and `Y' in the original
  4325. example), those procedures are fairly simple.  Their interfaces are
  4326. just like they would be if they were self-contained procedures (without
  4327. `ENTRY'), of course, since that is what the callers expect.  Their code
  4328. consists of simply calling the private procedure, described above, with
  4329. the appropriate extra arguments (the entry point index, and perhaps a
  4330. pointer to a multiple-type- return variable, local to the public
  4331. procedure, that contains all the supported returnable non-character
  4332. types).  For arguments that are not listed for a given entry point that
  4333. are listed for other entry points, and therefore that are in the
  4334. "master list" for the private procedure, null pointers (in C, the
  4335. `NULL' macro) are passed.  Also, for entry points that are part of a
  4336. multiple-type- returning function, code is compiled after the call of
  4337. the private procedure to extract from the multi-type union the
  4338. appropriate result, depending on the type of the entry point in
  4339. question, returning that result to the original caller.
  4340.    When debugging a procedure containing alternate entry points, you
  4341. can either set a break point on the public procedure itself (e.g.  a
  4342. break point on `X' or `Y') or on the private procedure that contains
  4343. most of the pertinent code (e.g. `__g77_masterfun_X').  If you do the
  4344. former, you should use the debugger's command to "step into" the called
  4345. procedure to get to the actual code; with the latter approach, the
  4346. break point leaves you right at the actual code, skipping over the
  4347. public entry point and its call to the private procedure (unless you
  4348. have set a break point there as well, of course).
  4349.    Further, the list of dummy arguments that is visible when the
  4350. private procedure is active is going to be the expanded version of the
  4351. list for whichever particular entry point is active, as explained
  4352. above, and the way in which return values are handled might well be
  4353. different from how they would be handled for an equivalent single-entry
  4354. function.
  4355. File: ^.!gcc.docs.fortran.g77,  Node: Assigned Statement Labels,  Prev: Alternate Entry Points,  Up: Debugging and Interfacing
  4356. Assigned Statement Labels (ASSIGN and GOTO)
  4357. ===========================================
  4358.    For portability to machines where a pointer (such as to a label,
  4359. which is how `g77' implements `ASSIGN' and its cousin, the assigned
  4360. `GOTO') is wider (bitwise) than an `INTEGER', `g77' does not
  4361. necessarily use the same memory location to hold the `ASSIGN'ed value
  4362. of a variable as it does the numerical value in that variable, unless
  4363. the variable is wide enough (can hold enough bits).
  4364.    In particular, while `g77' implements
  4365.      I = 10
  4366. as, in C notation, `i = 10;', it might implement
  4367.      ASSIGN 10 TO I
  4368. as, in GNU's extended C notation (for the label syntax),
  4369. `__g77_ASSIGN_I = &&L10;' (where `L10' is just a massaging of the
  4370. Fortran label `10' to make the syntax C-like; `g77' doesn't actually
  4371. generate the name `L10' or any other name like that, since debuggers
  4372. cannot access labels anyway).
  4373.    While this currently means that an `ASSIGN' statement might not
  4374. overwrite the numeric contents of its target variable, *do not* write
  4375. any code depending on this feature.  `g77' has already changed this
  4376. implementation across versions and might do so in the future.  This
  4377. information is provided only to make debugging Fortran programs
  4378. compiled with the current version of `g77' somewhat easier.  If there's
  4379. no debugger-visible variable named `__g77_ASSIGN_I' in a program unit
  4380. that does `ASSIGN 10 TO I', that probably means `g77' has decided it
  4381. can store the pointer to the label directly into `I' itself.
  4382.    (Currently, `g77' always chooses to make the separate variable, to
  4383. improve the likelihood that `-O -Wuninitialized' will diagnose failures
  4384. to do things like `GOTO I' without `ASSIGN 10 TO I' despite doing
  4385. `I=5'.)
  4386. File: ^.!gcc.docs.fortran.g77,  Node: Collected Fortran Wisdom,  Next: Trouble,  Prev: Debugging and Interfacing,  Up: Top
  4387. Collected Fortran Wisdom
  4388. ************************
  4389.    Most users of `g77' can be divided into two camps:
  4390.    * Those writing new Fortran code to be compiled by `g77'.
  4391.    * Those using `g77' to compile existing, "legacy" code.
  4392.    Users writing new code generally understand most of the necessary
  4393. aspects of Fortran to write "mainstream" code, but often need help
  4394. deciding how to handle problems, such as the construction of libraries
  4395. containing `BLOCK DATA'.
  4396.    Users dealing with "legacy" code sometimes don't have much
  4397. experience with Fortran, but believe that the code they're compiling
  4398. already works when compiled by other compilers (and might not
  4399. understand why, as is sometimes the case, it doesn't work when compiled
  4400. by `g77').
  4401.    The following information is designed to help users do a better job
  4402. coping with existing, "legacy" Fortran code, and with writing new code
  4403. as well.
  4404. * Menu:
  4405. * Overly Convenient Options::  Temptations to avoid, habits to not form.
  4406. * Block Data and Libraries::   How `g77' solves a common problem.
  4407. * Faster Programs::            Everybody wants these, but at what cost?
  4408. * Working Programs::           Getting programs to work should be done first.
  4409. * Loops::                      Fortran `DO' loops surprise many people.
  4410. * Advantages Over f2c::        If `f2c' is so great, why `g77'?
  4411. File: ^.!gcc.docs.fortran.g77,  Node: Overly Convenient Options,  Next: Block Data and Libraries,  Up: Collected Fortran Wisdom
  4412. Overly Convenient Command-line Options
  4413. ======================================
  4414.    These options should be used only as a quick-and-dirty way to
  4415. determine how well your program will run under different compilation
  4416. models without having to change the source.  Some are more problematic
  4417. than others, depending on how portable and maintainable you want the
  4418. program to be (and, of course, whether you are allowed to change it at
  4419. all is crucial).
  4420.    You should not continue to use these command-line options to compile
  4421. a given program, but rather should make changes to the source code:
  4422. `-finit-local-zero'
  4423.      (This option specifies that any uninitialized local variables and
  4424.      arrays have default initialization to binary zeros.)
  4425.      Many other compilers do this automatically, which means lots of
  4426.      Fortran code developed with those compilers depends on it.
  4427.      It is safer (and probably would produce a faster program) to find
  4428.      the variables and arrays that need such initialization and provide
  4429.      it explicitly via `DATA', so that `-finit-local-zero' is not
  4430.      needed.
  4431.      Consider using `-Wuninitialized' (which requires `-O') to find
  4432.      likely candidates, but do not specify `-finit-local-zero' or
  4433.      `-fno-automatic', or this technique won't work.
  4434. `-fno-automatic'
  4435.      (This option specifies that all local variables and arrays are to
  4436.      be treated as if they were named in `SAVE' statements.)
  4437.      Many other compilers do this automatically, which means lots of
  4438.      Fortran code developed with those compilers depends on it.
  4439.      The effect of this is that all variables and arrays are made
  4440.      static, that is, not placed on the stack or in heap storage.  This
  4441.      might cause a buggy program to appear to work better.  If so,
  4442.      rather than relying on this command-line option (and hoping all
  4443.      compilers provide the equivalent one), add `SAVE' statements to
  4444.      some or all program unit sources, as appropriate.  Consider using
  4445.      `-Wuninitialized' (which requires `-O') to find likely candidates,
  4446.      but do not specify `-finit-local-zero' or `-fno-automatic', or
  4447.      this technique won't work.
  4448.      The default is `-fautomatic', which tells `g77' to try and put
  4449.      variables and arrays on the stack (or in fast registers) where
  4450.      possible and reasonable.  This tends to make programs faster.
  4451. `-fugly'
  4452.      Fix the source code so that `-fno-ugly' will work.  Note that, for
  4453.      many programs, it is difficult to practically avoid using the
  4454.      features enabled via `-fugly-init', and these features pose the
  4455.      lowest risk of writing nonportable code, among the various "ugly"
  4456.      features.
  4457. `-fGROUP-intrinsics-hide'
  4458.      Change the source code to use `EXTERNAL' for any external procedure
  4459.      that might be the name of an intrinsic.  It is easy to find these
  4460.      using `-fGROUP-intrinsics-disable'.
  4461. File: ^.!gcc.docs.fortran.g77,  Node: Block Data and Libraries,  Next: Faster Programs,  Prev: Overly Convenient Options,  Up: Collected Fortran Wisdom
  4462. Block Data and Libraries
  4463. ========================
  4464.    To ensure that block data program units are linked, especially a
  4465. concern when they are put into libraries, give each one a name (as in
  4466. `BLOCK DATA FOO') and make sure there is an `EXTERNAL FOO' statement in
  4467. every program unit that uses any common block initialized by the
  4468. corresponding `BLOCK DATA'.  `g77' currently compiles a `BLOCK DATA' as
  4469. if it were a `SUBROUTINE', that is, it generates an actual procedure
  4470. having the appropriate name.  The procedure does nothing but return
  4471. immediately if it happens to be called.  For `EXTERNAL FOO', where
  4472. `FOO' is not otherwise referenced in the same program unit, `g77'
  4473. assumes there exists a `BLOCK DATA FOO' in the program and ensures that
  4474. by generating a reference to it so the linker will make sure it is
  4475. present.  (Specifically, `g77' outputs in the data section a static
  4476. pointer to the external name `FOO'.)
  4477.    The implementation `g77' currently uses to make this work is one of
  4478. the few things not compatible with `f2c' as currently shipped.  `f2c'
  4479. currently does nothing with `EXTERNAL FOO' except issue a warning that
  4480. `FOO' is not otherwise referenced, and for `BLOCK DATA FOO', f2c
  4481. doesn't generate a dummy procedure with the name `FOO'.  The upshot is
  4482. that you shouldn't mix `f2c' and `g77' in this particular case.  If you
  4483. use f2c to compile `BLOCK DATA FOO', then any `g77'-compiled program
  4484. unit that says `EXTERNAL FOO' will result in an unresolved reference
  4485. when linked.  If you do the opposite, then `FOO' might not be linked in
  4486. under various circumstances (such as when `FOO' is in a library, or
  4487. you're using a "clever" linker--so clever, it produces a broken program
  4488. with little or no warning by omitting initializations of global data
  4489. because they are contained in unreferenced procedures).
  4490.    The changes you make to your code to make `g77' handle this
  4491. situation, however, appear to be a widely portable way to handle it.
  4492. That is, many systems permit it (as they should, since the FORTRAN 77
  4493. standard permits `EXTERNAL FOO' when `FOO' is a block data program
  4494. unit), and of the ones that might not link `BLOCK DATA FOO' under some
  4495. circumstances, most of them appear to do so once `EXTERNAL FOO' is
  4496. present in the appropriate program units.
  4497. File: ^.!gcc.docs.fortran.g77,  Node: Faster Programs,  Next: Working Programs,  Prev: Block Data and Libraries,  Up: Collected Fortran Wisdom
  4498. Faster Programs
  4499. ===============
  4500.    Aside from the usual `gcc' options, such as `-O', `-ffast-math', and
  4501. so on, consider trying:
  4502. `-fno-f2c'
  4503.      Use this if you aren't linking with any code compiled using `f2c'.
  4504.      (Note that `libf2c' is *not* an example of code that is compiled
  4505.      using `f2c'--it is compiled by a C compiler, usually `gcc'.)
  4506.    If you're using `-fno-automatic' already, you probably should change
  4507. your code to allow compilation with `-fautomatic' (the default), to
  4508. allow the program to run faster.
  4509.    Similarly, you should be able to use `-fno-init-local-zero' (the
  4510. default) instead of `-finit-local-zero'.  This is because it is rare
  4511. that every variable affected by these options in a given program
  4512. actually needs to be so affected.
  4513.    For example, `-fno-automatic', which effectively `SAVE's every local
  4514. variable and array, affects even things like `DO' iteration variables,
  4515. which rarely need to be `SAVE'd, and this often reduces run-time
  4516. performances.  Similarly, `-fno-init-local-zero' forces such variables
  4517. to be initialized to zero--when `SAVE'd (such as when
  4518. `-fno-automatic'), this by itself generally affects only startup time
  4519. for a program, but when not `SAVE'd, it can slow down the procedure
  4520. every time it is called.
  4521.    *Note Overly Convenient Command-Line Options: Overly Convenient
  4522. Options, for information on the `-fno-automatic' and
  4523. `-finit-local-zero' options and how to convert their use into selective
  4524. changes in your own code.
  4525. File: ^.!gcc.docs.fortran.g77,  Node: Working Programs,  Next: Loops,  Prev: Faster Programs,  Up: Collected Fortran Wisdom
  4526. Working Programs
  4527. ================
  4528.    Getting Fortran programs to work in the first place can be quite a
  4529. challenge--even when the programs already work on other systems, or
  4530. when using other compilers.
  4531.    `g77' offers some options that might be useful for tracking down
  4532. bugs in such programs.  *Note Option Summary::, for a summary of these
  4533. and other options, and cross-references for each such option to the
  4534. pertinent material in this manual.
  4535. `-finit-local-zero'
  4536.      A program that works better when compiled with this option is
  4537.      depending on a particular system's, or compiler's, tendency to
  4538.      initialize some variables to zero.  It might be worthwhile finding
  4539.      such cases and fixing them.
  4540. `-fno-automatic'
  4541.      A program that works better when compiled with this option is
  4542.      depending on not having to use the `SAVE' statement as required by
  4543.      the Fortran standard.  It might be worthwhile finding such cases
  4544.      and fixing them.
  4545. `-Wimplicit'
  4546.      This might catch failures to properly specify the types of
  4547.      variables, arrays, and functions in the code.  However, in code
  4548.      that makes heavy use of Fortran's implicit-typing facility, this
  4549.      option might produce so many warnings about cases that are
  4550.      working, it would be hard to find the one or two that represent
  4551.      bugs.
  4552. `-Wunused'
  4553.      This can find bugs involving implicitly typing, sometimes more
  4554.      easily than using -Wimplicit in code that makes heavy use of
  4555.      implicit typing.  An unused variable or array might indicate that
  4556.      the spelling for its declaration is different from that of its
  4557.      intended uses.
  4558. `-Wuninitialized'
  4559.      This can find bugs involving uninitialized variables, which can in
  4560.      turn result from misspellings in declaration statements.
  4561. `-Wsurprising'
  4562.      This can find bugs involving expression evaluation or in the way
  4563.      `DO' loops with non-integral iteration variables are handled.
  4564.      Cases found by this option might indicate a difference of
  4565.      interpretation between the author of the code involved, and a
  4566.      standard-conforming compiler such as `g77'.  Such a difference
  4567.      might produce actual bugs.
  4568.      In any case, changing the code to explicitly do what the
  4569.      programmer might have expected it to do, so `g77' and other
  4570.      compilers are more likely to follow the programmer's expectations,
  4571.      might be worthwhile, especially if such changes make the program
  4572.      work better.
  4573.      It is possible that the "extra" warnings enabled by this option
  4574.      could expose bugs in the code.
  4575. File: ^.!gcc.docs.fortran.g77,  Node: Loops,  Next: Advantages Over f2c,  Prev: Working Programs,  Up: Collected Fortran Wisdom
  4576. Loops
  4577. =====
  4578.    The meaning of a `DO' loop in Fortran is precisely specified in the
  4579. Fortran standard...and is quite different from what many programmers
  4580. might expect.
  4581.    In particular, Fortran `DO' loops are implemented as if the number
  4582. of trips through the loop is calculated *before* the loop is entered.
  4583.    The number of trips for a loop is calculated from the START, END,
  4584. and INCREMENT values specified in a statement such as:
  4585.      DO ITER = START, END, INCREMENT
  4586.    The trip count is evaluated using a fairly simple formula based on
  4587. the three values following the `=' in the statement, and it is that
  4588. trip count that is effectively decremented during each iteration of the
  4589. loop.  If, at the beginning of an iteration of the loop, the trip count
  4590. is zero or negative, the loop terminates.  The per-loop-iteration
  4591. modifications to ITER are not related to determining whether to
  4592. terminate the loop.
  4593.    There are two important things to remember about the trip count:
  4594.    * It can be *negative*, in which case it is treated as if it was
  4595.      zero--meaning the loop is not executed at all.
  4596.    * The type used to *calculate* the trip count the same type as ITER,
  4597.      but the final calculation, and thus the type of the trip count
  4598.      itself, always is `INTEGER'.
  4599.    These two items mean that there are loops that cannot be written in
  4600. straightforward fashion using the Fortran `DO'.
  4601.    For example, on a system with the canonical 32-bit two's-complement
  4602. implementation of `INTEGER', the following loop will not work:
  4603.      DO I = -2000000000, 2000000000
  4604. Although the START and END values are well within the range of
  4605. `INTEGER', the *trip count* is not.  The expected trip count is
  4606. 40000000001, which is outside the range of `INTEGER' on many systems.
  4607.    Instead, the above loop should be constructed this way:
  4608.      I = -2000000000
  4609.      DO
  4610.        IF (I .GT. 2000000000) EXIT
  4611.        ...
  4612.        I = I + 1
  4613.      END DO
  4614. The simple `DO' construct and the `EXIT' statement (used to leave the
  4615. innermost loop) are F90 features that `g77' supports.
  4616.    Some Fortran compilers have buggy implementations of `DO', in that
  4617. they don't follow the standard.  They implement `DO' as a
  4618. straightforward translation to what, in C, would be a `for' statement.
  4619. Instead of creating a temporary variable to hold the trip count as
  4620. calculated at run time, these compilers use the iteration variable ITER
  4621. to control whether the loop continues at each iteration.
  4622.    The bug in such an implementation shows up when the trip count is
  4623. within the range of the type of ITER, but the magnitude of `ABS(END) +
  4624. ABS(INCR)' exceeds that range.  For example:
  4625.      DO I = 2147483600, 2147483647
  4626. A loop started by the above statement will work as implemented by
  4627. `g77', but the use, by some compilers, of a more C-like implementation
  4628. akin to
  4629.      for (i = 2147483600; i <= 2147483647; ++i)
  4630. produces a loop that does not terminate, because `i' can never be
  4631. greater than 2147483647, since incrementing it beyond that value
  4632. overflows `i', setting it to -2147483648.  This is a large, negative
  4633. number that still is less than 2147483647.
  4634.    Another example of unexpected behavior of `DO' involves using a
  4635. nonintegral iteration variable ITER, such as a `REAL' or `DOUBLE
  4636. PRECISION' variable.  Consider the following program:
  4637.            DATA BEGIN, END, STEP /.1, .31, .007/
  4638.            DO 10 R = BEGIN, END, STEP
  4639.               IF (R .GT. END) PRINT *, R, ' .GT. ', END, '!!'
  4640.               PRINT *,R
  4641.      10    CONTINUE
  4642.            PRINT *,'LAST = ',R
  4643.            IF (R .LE. END) PRINT *, R, ' .LE. ', END, '!!'
  4644.            END
  4645. A C-like view of `DO' would hold that the two "exclamatory" `PRINT' are
  4646. never executed.  However, this is the output of running the above
  4647. program as compiled by `g77' on a Linux ix86 system:
  4648.       .100000001
  4649.       .107000001
  4650.       .114
  4651.       .120999999
  4652.       ...
  4653.       .289000005
  4654.       .296000004
  4655.       .303000003
  4656.      LAST =   .310000002
  4657.       .310000002 .LE.   .310000002!!
  4658.    Note that one of the two checks in the program turned up an apparent
  4659. violation of the programmer's expectation--yet, the loop is correctly
  4660. implemented by `g77', in that it has 30 iterations.  This trip count of
  4661. 30 is correct when evaluated using the floating-point representations
  4662. for the BEGIN, END, and INCR values (.1, .31, .007) on Linux ix86 are
  4663. used.  On other systems, an apparently more accurate trip count of 31
  4664. might result, but, nevertheless, `g77' is faithfully following the
  4665. Fortran standard, and the result is not what the author of the sample
  4666. program above apparently expected.  (Such other systems might, for
  4667. different values in the `DATA' statement, violate the other
  4668. programmer's expectation, for example.)
  4669.    Due to this combination of imprecise representation of
  4670. floating-point values and the often-misunderstood interpretation of
  4671. `DO' by standard-conforming compilers such as `g77', use of `DO' loops
  4672. with `REAL' or `DOUBLE PRECISION' iteration variables is not
  4673. recommended.  Such use can be caught by specifying `-Wsurprising'.
  4674. *Note Warning Options::, for more information on this option.
  4675. File: ^.!gcc.docs.fortran.g77,  Node: Advantages Over f2c,  Prev: Loops,  Up: Collected Fortran Wisdom
  4676. Advantages Over f2c
  4677. ===================
  4678.    Without `f2c', `g77' would have taken much longer to do and probably
  4679. not been as good for quite a while.  Sometimes people who notice how
  4680. much `g77' depends on, and documents encouragement to use, `f2c' ask
  4681. why `g77' was created if `f2c' already existed.
  4682.    This section gives some basic answers to these questions, though it
  4683. is not intended to be comprehensive.
  4684. * Menu:
  4685. * Language Extensions::  Features used by Fortran code.
  4686. * Compiler Options::     Features helpful during development.
  4687. * Compiler Speed::       Speed of the compilation process.
  4688. * Program Speed::        Speed of the generated, optimized code.
  4689. * Ease of Debugging::    Debugging ease-of-use at the source level.
  4690. * Character and Hollerith Constants::  A byte saved is a byte earned.
  4691. File: ^.!gcc.docs.fortran.g77,  Node: Language Extensions,  Next: Compiler Options,  Up: Advantages Over f2c
  4692. Language Extensions
  4693. -------------------
  4694.    `g77' offers several extensions to the Fortran language that `f2c'
  4695. doesn't.
  4696.    However, `f2c' offers a few that `g77' doesn't, like fairly complete
  4697. support for `INTEGER*2'.  It is expected that `g77' will offer some or
  4698. all of these missing features at some time in the future.  (Version
  4699. 0.5.18 of `g77' offers some rudimentary support for some of these
  4700. features.)
  4701. File: ^.!gcc.docs.fortran.g77,  Node: Compiler Options,  Next: Compiler Speed,  Prev: Language Extensions,  Up: Advantages Over f2c
  4702. Compiler Options
  4703. ----------------
  4704.    `g77' offers a whole bunch of compiler options that `f2c' doesn't.
  4705.    However, `f2c' offers a few that `g77' doesn't, like an option to
  4706. generate code to check array subscripts at run time.  It is expected
  4707. that `g77' will offer some or all of these missing options at some time
  4708. in the future.
  4709. File: ^.!gcc.docs.fortran.g77,  Node: Compiler Speed,  Next: Program Speed,  Prev: Compiler Options,  Up: Advantages Over f2c
  4710. Compiler Speed
  4711. --------------
  4712.    Saving the steps of writing and then rereading C code is a big reason
  4713. why `g77' should be able to compile code much faster than using `f2c'
  4714. in conjunction with the equivalent invocation of `gcc'.
  4715.    However, due to `g77''s youth, lots of self-checking is still being
  4716. performed.  As a result, this improvement is as yet unrealized (though
  4717. the potential seems to be there for quite a big speedup in the future).
  4718. It is possible that, as of version 0.5.18, `g77' is noticably faster
  4719. compiling many Fortran source files than using `f2c' in conjunction
  4720. with `gcc'.
  4721. File: ^.!gcc.docs.fortran.g77,  Node: Program Speed,  Next: Ease of Debugging,  Prev: Compiler Speed,  Up: Advantages Over f2c
  4722. Program Speed
  4723. -------------
  4724.    `g77' has the potential to better optimize code than `f2c', even
  4725. when `gcc' is used to compile the output of `f2c', because `f2c' must
  4726. necessarily translate Fortran into a somewhat lower-level language (C)
  4727. that cannot preserve all the information that is potentially useful for
  4728. optimization, while `g77' can gather, preserve, and transmit that
  4729. information directly to the GBE.
  4730.    For example, `g77' implements `ASSIGN' and assigned `GOTO' using
  4731. direct assignment of pointers to labels and direct jumps to labels,
  4732. whereas `f2c' maps the assigned labels to integer values and then uses
  4733. a C `switch' statement to encode the assigned `GOTO' statements.
  4734.    However, as is typical, theory and reality don't quite match, at
  4735. least not in all cases, so it is still the case that `f2c' plus `gcc'
  4736. can generate code that is faster than `g77'.
  4737.    It is hoped that version 0.5.18 of `g77' will offer default settings
  4738. and options that allow for better program speed, though it is not yet
  4739. known whether these same options, when applied to a `gcc' compilation
  4740. of `f2c' output, will improve the speed of programs compiled using that
  4741. method as well.
  4742. File: ^.!gcc.docs.fortran.g77,  Node: Ease of Debugging,  Next: Character and Hollerith Constants,  Prev: Program Speed,  Up: Advantages Over f2c
  4743. Ease of Debugging
  4744. -----------------
  4745.    Because `g77' compiles directly to assembler code like `gcc',
  4746. instead of translating to an intermediate language (C) as does `f2c',
  4747. support for debugging can be better for `g77' than `f2c'.
  4748.    However, although `g77' might be somewhat more "native" in terms of
  4749. debugging support than `f2c' plus `gcc', there still are a lot of
  4750. things "not quite right".  Many of the important ones should be
  4751. resolved in the near future.
  4752.    For example, `g77' doesn't have to worry about reserved names like
  4753. `f2c' does.  Given `FOR = WHILE', `f2c' must necessarily translate this
  4754. to something *other* than `for = while;', because C reserves those
  4755. words.
  4756.    However, `g77' does still uses things like an extra level of
  4757. indirection for `ENTRY'-laden procedures--in this case, because the
  4758. back end doesn't yet support multiple entry points.
  4759.    Another example is that, given
  4760.      COMMON A, B
  4761.      EQUIVALENCE (B, C)
  4762. the `g77' user should be able to access the variables directly, by name,
  4763. without having to traverse C-like structures and unions, while `f2c' is
  4764. unlikely to ever offer this ability (due to limitations in the C
  4765. language).
  4766.    However, due to apparent bugs in the back end, `g77' currently
  4767. doesn't take advantage of this facility at all--it doesn't emit any
  4768. debugging information for `COMMON' and `EQUIVALENCE' areas, other than
  4769. information on the array of `char' it creates (and, in the case of
  4770. local `EQUIVALENCE', names) for each such area.
  4771.    Yet another example is arrays.  `g77' represents them to the debugger
  4772. using the same "dimensionality" as in the source code, while `f2c' must
  4773. necessarily convert them all to one-dimensional arrays to fit into the
  4774. confines of the C language.  However, the level of support offered by
  4775. debuggers for interactive Fortran-style access to arrays as compiled by
  4776. `g77' can vary widely.  In some cases, it can actually be an advantage
  4777. that `f2c' converts everything to widely supported C semantics.
  4778.    In fairness, `g77' could do many of the things `f2c' does to get
  4779. things working at least as well as `f2c'--for now, the maintainers have
  4780. tended to prefer making `g77' work the way they think it is supposed
  4781. to, and find help improving the other products (the GBE of `gcc';
  4782. `gdb'; and so on) to get things working properly.
  4783. File: ^.!gcc.docs.fortran.g77,  Node: Character and Hollerith Constants,  Prev: Ease of Debugging,  Up: Advantages Over f2c
  4784. Character and Hollerith Constants
  4785. ---------------------------------
  4786.    To avoid the extensive hassle that would be needed to avoid this,
  4787. `f2c' uses C character constants to encode character and Hollerith
  4788. constants.  That means a constant like `'HELLO'' is translated to
  4789. `"hello"' in C, which further means that an extra null byte is present
  4790. at the end of the constant.  This null byte is superfluous.
  4791.    `g77' does not generate such null bytes.  This represents significant
  4792. savings of resources, such as on systems where `/dev/null' or
  4793. `/dev/zero' represent bottlenecks in the systems' performance, because
  4794. `g77' simply asks for fewer zeros from the operating system than `f2c'.
  4795. File: ^.!gcc.docs.fortran.g77,  Node: Trouble,  Next: Open Questions,  Prev: Collected Fortran Wisdom,  Up: Top
  4796. Known Causes of Trouble with GNU Fortran
  4797. ****************************************
  4798.    This section describes known problems that affect users of GNU
  4799. Fortran.  Most of these are not GNU Fortran bugs per se--if they were,
  4800. we would fix them.  But the result for a user may be like the result of
  4801. a bug.
  4802.    Some of these problems are due to bugs in other software, some are
  4803. missing features that are too much work to add, and some are places
  4804. where people's opinions differ as to what is best.
  4805.    Information on bugs that show up when configuring, porting, building,
  4806. or installing `g77' is not provided here.  *Note Problems Installing::.
  4807.    (Note that some of this portion of the manual is lifted directly
  4808. from the `gcc' manual, with minor modifications to tailor it to users
  4809. of `g77'.  Anytime a bug seems to have more to do with the `gcc'
  4810. portion of `g77', *Note Known Causes of Trouble with GNU CC:
  4811. (gcc)Trouble.)
  4812. * Menu:
  4813. * But-bugs::         Bugs really in other programs.
  4814. * Actual Bugs::      Bugs and misfeatures we will fix later.
  4815. * Missing Features:: Features we already know we want to add later.
  4816. * Disappointments::  Regrettable things we can't change.
  4817. * Non-bugs::         Things we think are right, but some others disagree.
  4818. * Warnings and Errors::  Which problems in your code get warnings,
  4819.                          and which get errors.
  4820. File: ^.!gcc.docs.fortran.g77,  Node: But-bugs,  Next: Actual Bugs,  Up: Trouble
  4821. Bugs Not In GNU Fortran
  4822. =======================
  4823.    These are bugs to which the maintainers often have to reply, "but
  4824. that isn't a bug in `g77'...".  Some of these already are fixed in new
  4825. versions of other software; some still need to be fixed; some are
  4826. problems with how `g77' is installed or is being used; some just cannot
  4827. be addressed at this time until more is known about the problem.
  4828.    Please don't re-report these bugs to the `g77' maintainers--if you
  4829. must remind someone how important it is to you that the problem be
  4830. fixed, talk to the people responsible for the other products identified
  4831. below, but preferably only after you've tried the latest versions of
  4832. those products.  The `g77' maintainers have their hands full working on
  4833. just fixing and improving `g77', without serving as a clearinghouse for
  4834. all bugs that happen to affect `g77' users.
  4835.    *Note Collected Fortran Wisdom::, for information on behavior of
  4836. Fortran programs, and the programs that compile them, that might be
  4837. *thought* to indicate bugs.
  4838.    * On some older Linux systems, programs with common blocks larger
  4839.      than 16MB cannot be linked without some kind of error message
  4840.      being produced.
  4841.      This is a bug in older versions of `ld', fixed in more recent
  4842.      versions of `binutils', such as version 2.6.
  4843.    * There are some known problems when using `gdb' on code compiled by
  4844.      `g77'.  Inadequate investigation as of the release of 0.5.16
  4845.      results in not knowing which products are the culprit, but
  4846.      `gdb-4.14' definitely crashes when, for example, an attempt is
  4847.      made to print the contents of a `COMPLEX*16' dummy array, on at
  4848.      least some Linux machines, plus some others.
  4849.    * On some systems, perhaps just those with out-of-date (shared?)
  4850.      libraries, unresolved-reference errors happen when linking
  4851.      `g77'-compiled programs (which should be done using `g77').
  4852.      If this happens to you, try appending `-lc' to the command you use
  4853.      to link the program, e.g. `g77 foo.f -lc'.  `g77' already
  4854.      specifies `-lf2c -lm' when it calls the linker, but it cannot also
  4855.      specify `-lc' because not all systems have a file named `libc.a'.
  4856.      It is unclear at this point whether there are legitimately
  4857.      installed systems where `-lf2c -lm' is insufficient to resolve
  4858.      code produced by `g77'.
  4859.    * If your program doesn't link, due to unresolved references to names
  4860.      like `_main', make sure you're using the `g77' command to do the
  4861.      link, since this command ensures that the necessary libraries are
  4862.      loaded by specifying `-lf2c -lm' when it invokes the `gcc' command
  4863.      to do the actual link.  (Use the `-v' option to discover more
  4864.      about what actually happens when you use the `g77' and `gcc'
  4865.      commands.)
  4866.      Also, try specifying `-lc' as the last item on the `g77' command
  4867.      line, because some systems need it and `g77' doesn't do it
  4868.      automatically.
  4869.    * Developers of Fortran code on NeXTStep (all architectures) have to
  4870.      watch out for the following problem when writing programs with
  4871.      large, statically allocated (i.e. non-stack based) data structures
  4872.      (common blocks, saved arrays).
  4873.      Due to the way the native loader (`/bin/ld') lays out data
  4874.      structures in virtual memory, it is very easy to create an
  4875.      executable wherein the `__DATA' segment overlaps (has addresses in
  4876.      common) with the `UNIX STACK' segment.
  4877.      This leads to all sorts of trouble, from the executable simply not
  4878.      executing, to bus errors.  The NeXTStep command line tool
  4879.      `ebadexec' points to the problem as follows:
  4880.           % `/bin/ebadexec a.out'
  4881.           /bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000
  4882.           rounded size = 0x2a000) of executable file: a.out overlaps with UNIX
  4883.           STACK segment (truncated address = 0x400000 rounded size =
  4884.           0x3c00000) of executable file: a.out
  4885.      (In the above case, it is the `__LINKEDIT' segment that overlaps
  4886.      the stack segment.)
  4887.      This can be cured by assigning the `__DATA' segment (virtual)
  4888.      addresses beyond the stack segment.  A conservative estimate for
  4889.      this is from address 6000000 (hexadecimal) onwards--this has
  4890.      always worked for me [Toon Moene]:
  4891.           % `g77 -segaddr __DATA 6000000 test.f'
  4892.           % `ebadexec a.out'
  4893.           ebadexec: file: a.out appears to be executable
  4894.           %
  4895.      Browsing through `gcc/f/Makefile.in', you will find that the
  4896.      `f771' program itself also has to be linked with these flags--it
  4897.      has large statically allocated data structures.  (Version 0.5.18
  4898.      reduces this somewhat, but probably not enough.)
  4899.      (The above item was contributed by Toon Moene
  4900.      (`toon@moene.indiv.nluug.nl').)
  4901.    * `g77' rejects some particularly nonportable, silent data-type
  4902.      conversions such as `LOGICAL' to `REAL' (as in `A=.FALSE.', where
  4903.      `A' is type `REAL'), that other compilers might quietly accept.
  4904.      Some of these conversions are accepted by `g77' when the `-fugly'
  4905.      option is specified.
  4906. File: ^.!gcc.docs.fortran.g77,  Node: GPC Bugs
  4907. Known bugs and how to report bugs
  4908. *********************************
  4909.    If you encounter a bug with GPC, please check whether it is one of
  4910. the known bugs.  If not, report it to the GNU Pascal mailing list
  4911. `gpc@hut.fi'.  (But always report it if you solve the problem! ;-)
  4912. Known bugs
  4913. ==========
  4914.    The GPC compiler does not yet implement the whole ISO 7185 Pascal
  4915. standard, so please take this into account when you consider using this
  4916. for any purpose.
  4917.    See the file `version.c' to find out the version number of this GPC
  4918. (or run `gpc -v')
  4919.    Problems in this GPC version:
  4920.    * High optimization levels do not work properly on the Alpha.  Some
  4921.      conformance tests FAIL when compiled with -O6 flag, which means
  4922.      that the compiler generates invalid code. Don't use this flag in
  4923.      the alpha before the problem gets fixed.  It might have something
  4924.      to do with automatic inlining, but I have not yet looked at this.
  4925.      -O flag should be ok.  (Also take care when using explicit inline
  4926.      functions)
  4927.    * For some reason the pascal main program does not get lineno stabs
  4928.      -> It is hard to debug it with gdb...
  4929.    * The modules export everything, not just the stuff in the export
  4930.      interfaces. However, the unexported variables and functions are
  4931.      invisible to modules in other files.
  4932.    * type checking is mostly what C does, not what Pascal requires, so
  4933.      GPC does not yet implement a strongly typed language.  Although
  4934.      correct programs compile, incorrect ones compile also.
  4935.    * run time errors are not checked.
  4936.    * the inline set operations have some problems with operations on
  4937.      two sets if the sets do not contain equally many segments.
  4938.    * In addition, the set code generated in the alpha causes runtime
  4939.      runtime errors in the generated code.
  4940.    * Conformant arrays don't yet work (in general).  Until they do,
  4941.      this is a LEVEL-0 compiler.
  4942. Inconveniences
  4943. ==============
  4944.    * NEW & DISPOSE optional tag field arguments are ignored (warning
  4945.      given, code works)
  4946.    * GDB does not yet understand pascal sets, files or subranges.  Now
  4947.      GDB allows you to debug these things, even though it does not yet
  4948.      understand some stabs.
  4949.    * PACKED does not pack. (implementation dependent, warning given,
  4950.      code works)
  4951.    * Files of integer subranges that would fit in a byte do not;
  4952.      instead they are handled as files of integer.  This is especially
  4953.      annoying with "file of 0..255".
  4954. Notes for debugging
  4955. ===================
  4956.    * Forward referencing pointers generate DBX style debugging symbols
  4957.      by outputting the `.stabs' as an unknown pointer and later it just
  4958.      outputs the same `.stabs' again, but this time it also tells what
  4959.      type the pointer points to.  This seems to work for gdb. As of
  4960.      this writing I have not checked what happens with SDB type
  4961.      debugging info.  It might be that the pointer is left to be a
  4962.      `(void *)' pointer, so you have to cast it in order to output the
  4963.      object the pointer points to.
  4964.      Also, I have not tried any other debugger than gdb.  If you do,
  4965.      please let me know what happens.
  4966.      I think that GDB does not yet support the kind of `.stabs' that
  4967.      should be used to do this correctly:
  4968.             .stabs ":tANUMBER=BNUMBER", WHATEVER
  4969.      where ANUMBER is the unknown pointer type referenced earlier, and
  4970.      the BNUMBER is the type which ANUMBER actually is. This construct
  4971.      is not required in C.
  4972.    * When debugging, please note that the Initial Letter In Each
  4973.      Identifier Is In Upper Case And The Rest Are In Lower Case. If
  4974.      you wish to call C-routines declare them with the "C" directive,
  4975.      as follows:
  4976.           Procedure FooBAR(i:integer);c;
  4977.      This makes the external name to be `_foobar' (replace `_' with you
  4978.      machine prefix.)
  4979.           Procedure FooBAR(i:Integer); External;
  4980.      Uses external name `_Foobar'.
  4981.      It is done like this to reduce name clashes with `libc.a' and
  4982.      other possible libraries.
  4983.    * All visible GPC runtime system library routines are named `_p_...'.
  4984.    * However, the main program name is not capitalized.  (this is a
  4985.      kludge -> it may now clash with libc  identifiers. We'll change
  4986.      this somehow later)
  4987. File: ^.!gcc.docs.fortran.g77,  Node: Missing Features,  Next: Disappointments,  Prev: Actual Bugs,  Up: Trouble
  4988. Missing Features
  4989. ================
  4990.    This section lists features we know are missing from `g77', and
  4991. which we want to add someday.  (There is no priority implied in the
  4992. ordering below.)
  4993.    * `g77' does not support many of the features that distinguish
  4994.      Fortran 90 (and, now, Fortran 95) from ANSI FORTRAN 77.
  4995.      Some Fortran 90 features are listed here, because they make sense
  4996.      to offer even to die-hard users of F77.  For example, many of them
  4997.      codify various ways F77 has been extended to meet users' needs
  4998.      during its tenure, so `g77' might as well offer them as the primary
  4999.      way to meet those same needs, even if it offers compatibility with
  5000.      one or more of the ways those needs were met by other F77
  5001.      compilers in the industry.
  5002.      Still, many important F90 features are not listed here, because no
  5003.      attempt has been made to research each and every feature and
  5004.      assess its viability in `g77'.  In the meantime, users who need
  5005.      those features must use Fortran 90 compilers anyway, and the best
  5006.      approach to adding some F90 features to GNU Fortran might well be
  5007.      to fund a comprehensive project to create GNU Fortran 95.
  5008.    * `g77' does not allow `REAL' and other non-integral types for
  5009.      arguments to intrinsics like `AND', `OR', and `SHIFT'.
  5010.    * `g77' doesn't support `INTEGER*2', `LOGICAL*1', and similar.
  5011.      Version 0.6 will provide full support for this extremely important
  5012.      set of features.  In the meantime, version 0.5.18 provides
  5013.      rudimentary support for them.
  5014.    * `g77' rejects things other compilers accept, like `INTRINSIC
  5015.      SIN,SIN'.  As time permits in the future, some of these things
  5016.      that are easy for humans to read and write and unlikely to be
  5017.      intended to mean something else will be accepted by `g77' (though
  5018.      `-fpedantic' should trigger warnings about such non-standard
  5019.      constructs).
  5020.      In the meantime, you might as well fix your code to be more
  5021.      standard-conforming and portable.
  5022.      The kind of case that is important to except from the
  5023.      recommendation to change your code is one where following good
  5024.      coding rules would force you to write non-standard code that
  5025.      nevertheless has a clear meaning.
  5026.      For example, when writing an `INCLUDE' file that defines a common
  5027.      block, it might be appropriate to include a `SAVE' statement for
  5028.      the common block (such as `SAVE /CBLOCK/'), so that variables
  5029.      defined in the common block retain their values even when all
  5030.      procedures declaring the common block become inactive (return to
  5031.      their callers).
  5032.      However, putting `SAVE' statements in an `INCLUDE' file would
  5033.      prevent otherwise standard-conforming code from also specifying
  5034.      the `SAVE' statement, by itself, to indicate that all local
  5035.      variables and arrays are to have the `SAVE' attribute.
  5036.      For this reason, `g77' already has been changed to allow this
  5037.      combination, because although the general problem of gratuitously
  5038.      rejecting unambiguous and "safe" constructs still exists in `g77',
  5039.      this particular construct was deemed useful enough that it was
  5040.      worth fixing `g77' for just this case.
  5041.      So, while there is no need to change your code to avoid using this
  5042.      particular construct, there might be other, equally appropriate
  5043.      but non-standard constructs, that you shouldn't have to stop using
  5044.      just because `g77' (or any other compiler) gratuitously rejects it.
  5045.      Until the general problem is solved, if you have any such
  5046.      construct you believe is worthwhile using (e.g. not just an
  5047.      arbitrary, redundant specification of an attribute), please submit
  5048.      a bug report with an explanation, so we can consider fixing `g77'
  5049.      just for cases like yours.
  5050.    * `g77' doesn't accept `PARAMETER I=1'.  Supporting this obsolete
  5051.      form of the `PARAMETER' statement would not be particularly hard,
  5052.      as most of the parsing code is already in place and working.
  5053.      Until time/money is spent implementing it, you might as well fix
  5054.      your code to use the standard form, `PARAMETER (I=1)' (possibly
  5055.      needing `INTEGER I' preceding the `PARAMETER' statement as well,
  5056.      otherwise, in the obsolete form of `PARAMETER', the type of the
  5057.      variable is set from the type of the constant being assigned to
  5058.      it).
  5059.    * `g77' doesn't support pointers or allocatable objects.  This set
  5060.      of features is probably considered just behind `INTEGER*2' and
  5061.      intrinsics in `PARAMETER' statements on the list of large,
  5062.      important things to add to `g77'.
  5063.    * `g77' doesn't support the I/O statements `TYPE' and `ACCEPT'.
  5064.      These are common extensions that should be easy to support, but
  5065.      also are fairly easy to work around in user code.
  5066.    * `g77' doesn't support `STRUCTURE', `UNION', `RECORD', `MAP'.  This
  5067.      set of extensions is quite a bit lower on the list of large,
  5068.      important things to add to `g77', partly because it requires a
  5069.      great deal of work either upgrading or replacing `libf2c'.
  5070.    * There is no support for keywords such as `DISP='DELETE'' in the
  5071.      `OPEN', `CLOSE', and `INQUIRE' statements.  These extensions are
  5072.      easy to add to `g77' itself, but require much more work on
  5073.      `libf2c'.
  5074.    * `g77' doesn't allow intrinsics in `PARAMETER' statements.  This
  5075.      feature is considered to be absolutely vital, even though it is
  5076.      not standard-conforming, and is scheduled for version 0.6.
  5077.      Related to this, `g77' doesn't allow non-integral exponentiation
  5078.      in `PARAMETER' statements, such as `PARAMETER (R=2**.25)'.  It is
  5079.      unlikely `g77' will ever support this feature, as doing it
  5080.      properly requires complete emulation of a target computer's
  5081.      floating-point facilities when building `g77' as a cross-compiler.
  5082.      But, if the `gcc' back end is enhanced to provide such a facility,
  5083.      `g77' will likely use that facility in implementing this feature
  5084.      soon afterwards.
  5085.    * `g77' doesn't support `FORMAT(I<J>)' and the like.  Supporting
  5086.      this requires a significant redesign or replacement of `libf2c'.
  5087.    * Need option to suppress information messages (notes).  `-w' does
  5088.      this but also suppresses warnings.  The default should be to
  5089.      suppress info messages.
  5090.    * Provide some way, a la `gcc', for `g77' code to specify assembler
  5091.      code.
  5092.    * Support `INTEGER', `REAL', and `COMPLEX' equivalents for all
  5093.      applicable back-end-supported types (`char', `short int', `int',
  5094.      `long int', `long long int', and `long double').  This means
  5095.      providing intrinsic support, and maybe constant support (using F90
  5096.      syntax) as well, and, for most machines will result in automatic
  5097.      support of `INTEGER*1', `INTEGER*2', `INTEGER*8', and so on.  This
  5098.      is scheduled for version 0.6.
  5099.    * Provide as the default source-line model a "pure visual" mode,
  5100.      where the interpretation of a source program in this mode can be
  5101.      accurately determined by a user looking at a traditionally
  5102.      displayed rendition of the program (assuming the user knows
  5103.      whether the program is fixed or free form).
  5104.      That is, assume the user cannot tell tabs from spaces and cannot
  5105.      see trailing spaces on lines, but has canonical tab stops and, for
  5106.      fixed-form source, has the ability to always know exactly where
  5107.      column 72 is.
  5108.      This would change the default treatment of fixed-form source to
  5109.      not treat lines with tabs as if they were infinitely long--instead,
  5110.      they would end at column 72 just as if the tabs were replaced by
  5111.      spaces in the canonical way.
  5112.      As part of this, provide common alternate models (Digital, `f2c',
  5113.      and so on) via command-line options.  This includes allowing
  5114.      arbitrarily long lines for free-form source as well as fixed-form
  5115.      source and providing various limits and diagnostics as appropriate.
  5116.    * Support more general expressions to dimension arrays, such as
  5117.      array element references, function references, etc.
  5118.    * A `FLUSH' statement that does what many systems provide via `CALL
  5119.      FLUSH', but that supports `*' as the unit designator (same unit as
  5120.      for `PRINT').
  5121.    * Finish support for old-style `PARAMETER' statement (like F77
  5122.      `PARAMETER', but type of destination is set from type of source
  5123.      expression).
  5124.    * Character-type selector/cases for `SELECT CASE'.
  5125.    * Option to initialize everything not explicitly initialized to
  5126.      "weird" (machine-dependent) values, e.g. NANs, bad (non-`NULL')
  5127.      pointers, and largest-magnitude integers.
  5128.    * Add run-time bounds-checking of array/subscript references a la
  5129.      `f2c'.
  5130.    * Output labels for use by debuggers that know how to support them.
  5131.      Same with weirder things like construct names.  It is not yet
  5132.      known if any debug formats or debuggers support these.
  5133.    * Support the POSIX standard for Fortran.
  5134.    * Support Digital-style lossage of virtual blanks at end of source
  5135.      line if some command-line option specified.
  5136.      This affects cases where a character constant is continued onto
  5137.      the next line in a fixed-form source file, as in the following
  5138.      example:
  5139.           10    PRINT *,'HOW MANY
  5140.                1 SPACES?'
  5141.      `g77', and many other compilers, virtually extend the continued
  5142.      line through column 72 with blanks that become part of the
  5143.      character constant, but Digital Fortran normally didn't, leaving
  5144.      only one space between `MANY' and `SPACES?' in the output of the
  5145.      above statement.
  5146.      Fairly recently, at least one version of Digital Fortran was
  5147.      enhanced to provide the other behavior when a command-line option
  5148.      is specified, apparently due to demand from readers of the USENET
  5149.      group `comp.lang.fortran' to offer conformance to this widespread
  5150.      practice in the industry.  `g77' should return the favor by
  5151.      offering conformance to Digital's approach to handling the above
  5152.      example.
  5153.    * Consider a preprocessor designed specifically for Fortran to
  5154.      replace `cpp -traditional'.  There are several out there worth
  5155.      evaluating, at least.
  5156.    * Have `-Wunused' warn about unused labels.
  5157.    * Warn about assigned `GOTO'/`FORMAT' usage without any `ASSIGN' to
  5158.      variable.  (Actually, use of `-O -Wuninitialized' should take care
  5159.      of most of these.)
  5160.    * Add `-Wintrinsics' to warn about use of non-standard intrinsics
  5161.      without explicit `INTRINSIC' statements for them (to help find
  5162.      code that might fail silently when ported to another compiler).
  5163.    * Support `-fpedantic' more thoroughly, and use it only to generate
  5164.      warnings instead of rejecting constructs outright.  Have it warn:
  5165.      if a variable that dimensions an array is not a dummy or placed
  5166.      explicitly in `COMMON' (F77 does not allow it to be placed in
  5167.      `COMMON' via `EQUIVALENCE'); if specification statements follow
  5168.      statement-function-definition statements; about all sorts of
  5169.      syntactic extensions.
  5170.    * Warn about modifying `DO' variables via `EQUIVALENCE'.  (This test
  5171.      might be useful in setting the internal "doiter" flag for a
  5172.      variable or even array reference within a loop, since that might
  5173.      produce faster code someday.)
  5174.    * Add `-Wpromotions' to warn if source code appears to expect
  5175.      automatic, silent, and somewhat dangerous compiler-assisted
  5176.      conversion of `REAL' constants to `DOUBLE PRECISION' based on
  5177.      context.
  5178.      For example, warn about cases like this:
  5179.           DOUBLE PRECISION FOO
  5180.           PARAMETER (PI = 3.14159)
  5181.           FOO = PI * 3D0
  5182.    * Generally continue processing for warnings and recoverable (user)
  5183.      errors whenever possible--don't gratuitously make bad code.
  5184.      For example:
  5185.           INTRINSIC ZABS
  5186.           CALL FOO(ZABS)
  5187.           END
  5188.      When compiling the above with `-ff2c-intrinsics-disable', `g77'
  5189.      should indeed complain about passing `ZABS', but it still should
  5190.      compile, instead of rejecting the entire `CALL' statement.  (Some
  5191.      of this is related to improving the compiler internals to improve
  5192.      how statements are analyzed.)
  5193.    * If `-fno-ugly', reject badly designed trailing-radix quoted
  5194.      (typeless) numbers, such as `'123'O'.
  5195.    * Add `-Wugly*', `-Wautomatic', `-Wvxt-not-f90', `-Wf90', and so on.
  5196.      These would warn about places in the user's source where
  5197.      ambiguities are found.
  5198.      One especially interesting case that `-Wf90' would catch is use of
  5199.      `REAL(Z)', where `Z' is `DOUBLE COMPLEX'.  Apparently, traditional
  5200.      extended F77 compilers treat this as what all compilers should
  5201.      agree is `REAL(REAL(Z))', while F90 compilers are required to
  5202.      treat `REAL(Z)' as the same as `DBLE(Z)', returning a `DOUBLE
  5203.      PRECISION' result rather than a `REAL' result.
  5204.    * `-Wconversion' and related should flag places where non-standard
  5205.      conversions are found.  Perhaps much of this would be part of
  5206.      `-Wugly*'.
  5207.    * Complain when list of dummies containing an adjustable dummy array
  5208.      does not also contain every variable listed in the dimension list
  5209.      of the adjustable array.
  5210.      Currently, `g77' does complain about a variable that dimensions an
  5211.      array but doesn't appear in any dummy list or `COMMON' area, but
  5212.      this needs to be extended to catch cases where it doesn't appear in
  5213.      every dummy list that also lists any arrays it dimensions.
  5214.    * Make sure things like `RETURN 2HAB' are invalid in both source
  5215.      forms (must be `RETURN (2HAB)', which probably still makes no
  5216.      sense but at least can be reliably parsed).  Fixed form rejects
  5217.      it, but not free form, except in a way that is a bit difficult to
  5218.      understand.
  5219.    * The sort of routines usually found in the BSD-ish `libU77' should
  5220.      be provided in addition to the few utility routines in `libf2c'.
  5221.      Much of this work has already been done, and is awaiting
  5222.      integration into `g77'.
  5223. File: ^.!gcc.docs.fortran.g77,  Node: Disappointments,  Next: Non-bugs,  Prev: Missing Features,  Up: Trouble
  5224. Disappointments and Misunderstandings
  5225. =====================================
  5226.    These problems are perhaps regrettable, but we don't know any
  5227. practical way around them for now.
  5228.    * `g77' disallows `IMPLICIT CHARACTER*(*)'.  This is not
  5229.      standard-conforming, and there are some very good reasons for that.
  5230.      When I next remember any, I'll try to write them down.
  5231.    * `g77' doesn't allow a common block and an external procedure or
  5232.      `BLOCK DATA' to have the same name.  Some systems allow this, but
  5233.      `g77' does not, to be compatible with `f2c'.
  5234.      `g77' could special-case the way it handles `BLOCK DATA', since it
  5235.      is not compatible with `f2c' in this particular area (necessarily,
  5236.      since `g77' offers an important feature here), but it is likely
  5237.      that such special-casing would be very annoying to people with
  5238.      programs that use `EXTERNAL FOO', with no other mention of `FOO'
  5239.      in the same program unit, to refer to external procedures, since
  5240.      the result would be that `g77' would treat these references as
  5241.      requests to force-load BLOCK DATA program units.
  5242.      In that case, if `g77' modified names of `BLOCK DATA' so they
  5243.      could have the same names as `COMMON', users would find that their
  5244.      programs wouldn't link because the `FOO' procedure didn't have its
  5245.      name translated the same way.
  5246.      (Strictly speaking, `g77' could emit a
  5247.      null-but-externally-satisfying definition of `FOO' with its name
  5248.      transformed as if it had been a `BLOCK DATA', but that probably
  5249.      invites more trouble than it's worth.)
  5250.    * The current external-interface design, which includes naming of
  5251.      external procedures, COMMON blocks, and the library interface, has
  5252.      various usability problems, including things like adding
  5253.      underscores where not really necessary (and preventing easier
  5254.      inter-language operability) and yet not providing complete
  5255.      namespace freedom for user C code linked with Fortran apps (due to
  5256.      the naming of functions in the library, among other things).
  5257.      Project GNU should at least get all this "right" for systems it
  5258.      fully controls, such as the Hurd, and provide defaults and options
  5259.      for compatibility with existing systems and interoperability with
  5260.      popular existing compilers.
  5261. File: ^.!gcc.docs.fortran.g77,  Node: Non-bugs,  Next: Warnings and Errors,  Prev: Disappointments,  Up: Trouble
  5262. Certain Changes We Don't Want to Make
  5263. =====================================
  5264.    This section lists changes that people frequently request, but which
  5265. we do not make because we think GNU Fortran is better without them.
  5266.    * `-fno-backslash' should be the default, not `-fbackslash'.
  5267.      First of all, you  can always specify `-fno-backslash' to turn off
  5268.      this processing.
  5269.      Despite not being within the spirit (though apparently within the
  5270.      letter) of the ANSI FORTRAN 77 standard, `g77' defaults to
  5271.      `-fbackslash' because that is what most UNIX `f77' commands
  5272.      default to, and apparently lots of code depends on this feature.
  5273.      This is a particularly troubling issue.  The use of a C construct
  5274.      in the midst of Fortran code is bad enough, worse when it makes
  5275.      existing Fortran programs stop working (as happens when programs
  5276.      written for non-UNIX systems are ported to UNIX systems with
  5277.      compilers that provide the `-fbackslash' feature as the
  5278.      default--sometimes with no option to turn it off).
  5279.      The author of GNU Fortran wished, for reasons of linguistic
  5280.      purity, to make `-fno-backslash' the default for GNU Fortran and
  5281.      thus require users of UNIX `f77' and `f2c' to specify
  5282.      `-fbackslash' to get the UNIX behavior.
  5283.      However, the realization that `g77' is intended as a replacement
  5284.      for *UNIX* `f77', caused the author to choose to make `g77' as
  5285.      compatible with `f77' as feasible, which meant making `-fbackslash'
  5286.      the default.
  5287.      The primary focus on compatibility is at the source-code level,
  5288.      and the question became "What will users expect a replacement for
  5289.      `f77' to do, by default?" Although at least one UNIX `f77' does
  5290.      not provide `-fbackslash' as a default, it appears that, by far,
  5291.      the majority of them do, which suggests that, by far, the majority
  5292.      of code that is compiled by UNIX `f77' compilers expects
  5293.      `-fbackslash' to be the default.
  5294.      It is probably the case that more code exists that would *not*
  5295.      work with `-fbackslash' in force than code that requires it be in
  5296.      force.
  5297.      However, most of *that* code is not being compiled with `f77', and
  5298.      when it is, new build procedures (shell scripts, makefiles, and so
  5299.      on) must be set up anyway so that they work under UNIX.  That
  5300.      makes a much more natural and safe opportunity for non-UNIX users
  5301.      to adapt their build procedures for `g77''s default of
  5302.      `-fbackslash' than would exist for the majority of UNIX `f77'
  5303.      users who would have to modify existing, working build procedures
  5304.      to explicitly specify `-fbackslash' if that was not the default.
  5305.      One suggestion has been to configure the default for `-fbackslash'
  5306.      (and perhaps other options as well) based on the configuration of
  5307.      `g77'.
  5308.      This is technically quite straightforward, but will be avoided
  5309.      even in cases where not configuring defaults to be dependent on a
  5310.      particular configuration greatly inconveniences some users of
  5311.      legacy code.
  5312.      Many users appreciate the GNU compilers because they provide an
  5313.      environment that is uniform across machines.  These users would be
  5314.      inconvenienced if the compiler treated things like the format of
  5315.      the source code differently on certain machines.
  5316.      Occasionally users write programs intended only for a particular
  5317.      machine type.  On these occasions, the users would benefit if the
  5318.      GNU Fortran compiler were to support by default the same dialect
  5319.      as the other compilers on that machine.  But such applications are
  5320.      rare.  And users writing a program to run on more than one type of
  5321.      machine cannot possibly benefit from this kind of compatibility.
  5322.      (This is consistent with the design goals for `gcc'.  To change
  5323.      them for `g77', you must first change them for `gcc'.  Do not ask
  5324.      the maintainers of `g77' to do this for you, or to disassociate
  5325.      `g77' from the widely understood, if not widely agreed-upon, goals
  5326.      for GNU compilers in general.)
  5327.      This is why GNU Fortran does and will treat backslashes in the same
  5328.      fashion on all types of machines (by default).
  5329.      Of course, users strongly concerned about portability should
  5330.      indicate explicitly in their build procedures which options are
  5331.      expected by their source code, or write source code that has as
  5332.      few such expectations as possible.
  5333.      For example, avoid writing code that depends on backslash (`\')
  5334.      being interpreted either way in particular, such as by starting a
  5335.      program unit with:
  5336.           CHARACTER BACKSL
  5337.           PARAMETER (BACKSL = '\\')
  5338.      Then, use concatenation of `BACKSL' anyplace a backslash is
  5339.      desired.  (However, this technique does not work for Hollerith
  5340.      constants--which is good, since the only generally portable uses
  5341.      for Hollerith constants are in places where character constants
  5342.      can and should be used instead, for readability.)
  5343.      In this way, users can write programs which have the same meaning
  5344.      in many Fortran dialects.
  5345.    * `g77' does not use context to determine the types of constants or
  5346.      named constants (`PARAMETER').
  5347.      For example, consider the following statement:
  5348.           PRINT *, 3.1415926535 * 2D0
  5349.      `g77' will interpret the (truncated) constant `3.1415926535' as a
  5350.      `REAL', not `DOUBLE PRECISION', constant, because the suffix `D0'
  5351.      is not specified.
  5352.      As a result, the output of the above statement when compiled by
  5353.      `g77' will appear to have "less precision" than when compiled by
  5354.      other compilers.
  5355.      In these and other cases, some compilers detect the fact that a
  5356.      single-precision constant is used in a double-precision context
  5357.      and therefore interpret the single-precision constant as if it was
  5358.      *explicitly* specified as a double-precision constant.  (This has
  5359.      the effect of appending *decimal*, not *binary*, zeros to the
  5360.      fractional part of the number--producing different computational
  5361.      results.)
  5362.      The reason this misfeature is dangerous is that a slight,
  5363.      apparently innocuous change to the source code can change the
  5364.      computational results.  Consider:
  5365.           REAL ALMOST, CLOSE
  5366.           DOUBLE PRECISION FIVE
  5367.           PARAMETER (ALMOST = 5.000000000001)
  5368.           FIVE = 5
  5369.           CLOSE = 5.000000000001
  5370.           PRINT *, 5.000000000001 - FIVE
  5371.           PRINT *, ALMOST - FIVE
  5372.           PRINT *, CLOSE - FIVE
  5373.           END
  5374.      Running the above program should result in the same value being
  5375.      printed three times.  With `g77' as the compiler, it does.
  5376.      However, compiled by many other compilers, running the above
  5377.      program would print two or three distinct values, because in two
  5378.      or three of the statements, the constant `5.000000000001', which
  5379.      on most systems is exactly equal to `5.' when interpreted as a
  5380.      single-precision constant, is instead interpreted as a
  5381.      double-precision constant, preserving the represented precision.
  5382.      However, this "clever" promotion of type does not extend to
  5383.      variables or, in some compilers, to named constants.
  5384.      Since programmers often are encouraged to replace manifest
  5385.      constants or permanently-assigned variables with named constants
  5386.      (`PARAMETER' in Fortran), and might need to replace some constants
  5387.      with variables having the same values for pertinent portions of
  5388.      code, it is important that compilers treat code so modified in the
  5389.      same way so that the results of such programs are the same.  `g77'
  5390.      helps in this regard by treating constants just the same as
  5391.      variables in terms of determining their types in a
  5392.      context-independent way.
  5393.      Still, there is a lot of existing Fortran code that has been
  5394.      written to depend on the way other compilers freely interpret
  5395.      constants' types based on context, so anything `g77' can do to
  5396.      help flag cases of this in such code could be very helpful.
  5397.    * `g77' treats procedure references to *possible* intrinsic names as
  5398.      always enabling their intrinsic nature, regardless of whether the
  5399.      *form* of the reference is valid for that intrinsic.
  5400.      For example, `CALL IFIX' is interpreted by `g77' first as a
  5401.      reference to the `IFIX' intrinsic, because the reference is a
  5402.      procedure invocation (as compared to `J=IFIX'); only after
  5403.      establishing that, in the program unit being compiled, `IFIX' is
  5404.      in fact an intrinsic and not a local name that happens to have the
  5405.      same name as an intrinsic, does `g77' recognize that the form of
  5406.      the reference is invalid for that particular intrinsic.  At that
  5407.      point, `g77' issues a diagnostic.
  5408.      Some users claim that it is "obvious" that `CALL IFIX' references
  5409.      an external subroutine of their own, not an intrinsic function.
  5410.      However, `g77' knows about intrinsic subroutines, not just
  5411.      functions, and is able to support both having the same names, for
  5412.      example.
  5413.      As a result of this, `g77' rejects calls to intrinsics that are
  5414.      not subroutines, and function invocations of intrinsics that are
  5415.      not functions, just as it (and most compilers) rejects invocations
  5416.      of intrinsics with the wrong number (or types) of arguments.
  5417.      Use the `EXTERNAL IFIX' statement in a program unit that calls a
  5418.      user-written subroutine named `IFIX'.
  5419.    * Allow `DATA VAR/.../' to come before `COMMON /.../ ...,VAR,...'.
  5420.      It is *possible* `g77' will someday allow this.
  5421.      Then again, maybe it is better to have `g77' always require
  5422.      placement of `DATA' so that it can possibly immediately write
  5423.      constants to the output file, thus saving time and space.
  5424.      That is, `DATA A/1000000*1/' should perhaps always be immediately
  5425.      writable to canonical assembler, unless it's already known to be
  5426.      in a `COMMON' area following as-yet-uninitialized stuff, and to do
  5427.      this it cannot be followed by `COMMON A'.
  5428.    * Making side effects happen in the same order as in some other
  5429.      compiler.
  5430.      It is never safe to depend on the order of evaluation of side
  5431.      effects.  For example, an expression like this may very well
  5432.      behave differently from one compiler to another:
  5433.           J = IFUNC() - IFUNC()
  5434.      There is no guarantee that `IFUNC' will be evaluated in any
  5435.      particular order.  Either invocation might happen first.  If
  5436.      `IFUNC' returns 5 the first time it is invoked, and returns 12 the
  5437.      second time, `J' might end up with the value `7', or it might end
  5438.      up with `-7'.
  5439.      Generally, in Fortran, procedures with side-effects intended to be
  5440.      visible to the caller are best designed as *subroutines*, not
  5441.      functions.  Examples of such side-effects include:
  5442.         * The generation of random numbers that are intended to
  5443.           influence return values.
  5444.         * Performing I/O (other than internal I/O to local variables).
  5445.         * Updating information in common blocks.
  5446.      An example of a side-effect that is not intended to be visible to
  5447.      the caller is a function that maintains a cache of recently
  5448.      calculated results, intended solely to speed repeated invocations
  5449.      of the function with identical arguments.  Such a function can be
  5450.      safely used in expressions, because if the compiler optimizes away
  5451.      one or more calls to the function, operation of the program is
  5452.      unaffected (aside from being speeded up).
  5453. File: ^.!gcc.docs.fortran.g77,  Node: Warnings and Errors,  Prev: Non-bugs,  Up: Trouble
  5454. Warning Messages and Error Messages
  5455. ===================================
  5456.    The GNU compiler can produce two kinds of diagnostics: errors and
  5457. warnings.  Each kind has a different purpose:
  5458.      *Errors* report problems that make it impossible to compile your
  5459.      program.  GNU Fortran reports errors with the source file name,
  5460.      line number, and column within the line where the problem is
  5461.      apparent.
  5462.      *Warnings* report other unusual conditions in your code that
  5463.      *might* indicate a problem, although compilation can (and does)
  5464.      proceed.  Warning messages also report the source file name, line
  5465.      number, and column information, but include the text `warning:' to
  5466.      distinguish them from error messages.
  5467.    Warnings might indicate danger points where you should check to make
  5468. sure that your program really does what you intend; or the use of
  5469. obsolete features; or the use of nonstandard features of GNU Fortran.
  5470. Many warnings are issued only if you ask for them, with one of the `-W'
  5471. options (for instance, `-Wall' requests a variety of useful warnings).
  5472.    *Note:* Currently, the text of the line and a pointer to the column
  5473. is printed in most `g77' diagnostics.  Probably, as of version 0.6,
  5474. `g77' will no longer print the text of the source line, instead printing
  5475. the column number following the file name and line number in a form
  5476. that GNU Emacs recognizes.  This change is expected to speed up and
  5477. reduce the memory usage of the `g77' compiler.
  5478.    *Note Options to Request or Suppress Warnings: Warning Options, for
  5479. more detail on these and related command-line options.
  5480. File: ^.!gcc.docs.fortran.g77,  Node: Open Questions,  Next: Bugs,  Prev: Trouble,  Up: Top
  5481. Open Questions
  5482. **************
  5483.    Please consider offering useful answers to these questions!
  5484.    * `g77' treats constants like `Z'ABCD'' and `'ABCD'Z' as typeless.
  5485.      It seems like maybe the prefix-letter form, `Z'ABCD'', should be
  5486.      `INTEGER' instead.
  5487.      You can test for yourself whether a particular compiler treats the
  5488.      prefix form as `INTEGER' or typeless by running the following
  5489.      program:
  5490.           EQUIVALENCE (I, R)
  5491.           R = Z'ABCD'
  5492.           J = Z'ABCD'
  5493.           IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS'
  5494.           IF (J .NE. I) PRINT *, 'Prefix form is INTEGER'
  5495.           END
  5496.      If you wish to report the results of this test to the maintainers
  5497.      of `g77', please include full information on the compiler, system,
  5498.      and version information you're using.  (We already know how `g77'
  5499.      handles it, of course.)
  5500.      Perhaps this will be changed in version 0.6.
  5501.    * `LOC()' and other intrinsics are probably somewhat misclassified.
  5502.      Is the a need for more precise classification of intrinsics, and
  5503.      if so, what are the appropriate groupings?  Is there a need to
  5504.      individually enable/disable/delete/hide intrinsics from the
  5505.      command line?
  5506. File: ^.!gcc.docs.fortran.g77,  Node: Bugs,  Next: Service,  Prev: Open Questions,  Up: Top
  5507. Reporting Bugs
  5508. **************
  5509.    Your bug reports play an essential role in making GNU Fortran
  5510. reliable.
  5511.    When you encounter a problem, the first thing to do is to see if it
  5512. is already known.  *Note Trouble::.  If it isn't known, then you should
  5513. report the problem.
  5514.    Reporting a bug might help you by bringing a solution to your
  5515. problem, or it might not.  (If it does not, look in the service
  5516. directory; see *Note Service::.) In any case, the principal function of
  5517. a bug report is to help the entire community by making the next version
  5518. of GNU Fortran work better.  Bug reports are your contribution to the
  5519. maintenance of GNU Fortran.
  5520.    Since the maintainers are very overloaded, we cannot respond to every
  5521. bug report.  However, if the bug has not been fixed, we are likely to
  5522. send you a patch and ask you to tell us whether it works.
  5523.    In order for a bug report to serve its purpose, you must include the
  5524. information that makes for fixing the bug.
  5525. * Menu:
  5526. * Criteria:  Bug Criteria.   Have you really found a bug?
  5527. * Where: Bug Lists.         Where to send your bug report.
  5528. * Reporting: Bug Reporting.  How to report a bug effectively.
  5529. * Patches: Sending Patches.  How to send a patch for GNU Fortran.
  5530. * Known: Trouble.            Known problems.
  5531. * Help: Service.             Where to ask for help.
  5532. File: ^.!gcc.docs.fortran.g77,  Node: Bug Criteria,  Next: Bug Lists,  Up: Bugs
  5533. Have You Found a Bug?
  5534. =====================
  5535.    If you are not sure whether you have found a bug, here are some
  5536. guidelines:
  5537.    * If the compiler gets a fatal signal, for any input whatever, that
  5538.      is a compiler bug.  Reliable compilers never crash--they just
  5539.      remain obsolete.
  5540.    * If the compiler produces invalid assembly code, for any input
  5541.      whatever (except an `asm' statement), that is a compiler bug,
  5542.      unless the compiler reports errors (not just warnings) which would
  5543.      ordinarily prevent the assembler from being run.
  5544.    * If the compiler produces valid assembly code that does not
  5545.      correctly execute the input source code, that is a compiler bug.
  5546.      However, you must double-check to make sure, because you might
  5547.      have run into an incompatibility between GNU Fortran and
  5548.      traditional Fortran.  These incompatibilities might be considered
  5549.      bugs, but they are inescapable consequences of valuable features.
  5550.      Or you might have a program whose behavior is undefined, which
  5551.      happened by chance to give the desired results with another
  5552.      Fortran compiler.  It is best to check the relevant Fortran
  5553.      standard thoroughly if it is possible that the program indeed does
  5554.      something undefined.
  5555.      After you have localized the error to a single source line, it
  5556.      should be easy to check for these things.  If your program is
  5557.      correct and well defined, you have found a compiler bug.
  5558.      It might help if, in your submission, you identified the specific
  5559.      language in the relevant Fortran standard that specifies the
  5560.      desired behavior, if it isn't likely to be obvious and agreed-upon
  5561.      by all Fortran users.
  5562.    * If the compiler produces an error message for valid input, that is
  5563.      a compiler bug.
  5564.    * If the compiler does not produce an error message for invalid
  5565.      input, that is a compiler bug.  However, you should note that your
  5566.      idea of "invalid input" might be someone else's idea of "an
  5567.      extension" or "support for traditional practice".
  5568.    * If you are an experienced user of Fortran compilers, your
  5569.      suggestions for improvement of GNU Fortran are welcome in any case.
  5570. File: ^.!gcc.docs.fortran.g77,  Node: Bug Lists,  Next: Bug Reporting,  Prev: Bug Criteria,  Up: Bugs
  5571. Where to Report Bugs
  5572. ====================
  5573.    Send bug reports for GNU Fortran to `fortran@gnu.ai.mit.edu'.
  5574.    Often people think of posting bug reports to a newsgroup instead of
  5575. mailing them.  This sometimes appears to work, but it has one problem
  5576. which can be crucial: a newsgroup posting does not contain a mail path
  5577. back to the sender.  Thus, if maintainers need more information, they
  5578. may be unable to reach you.  For this reason, you should always send
  5579. bug reports by mail to the proper mailing list.
  5580.    As a last resort, send bug reports on paper to:
  5581.      GNU Compiler Bugs
  5582.      Free Software Foundation
  5583.      59 Temple Place - Suite 330
  5584.      Boston, MA 02111-1307, USA
  5585. File: ^.!gcc.docs.fortran.g77,  Node: Bug Reporting,  Next: Sending Patches,  Prev: Bug Lists,  Up: Bugs
  5586. How to Report Bugs
  5587. ==================
  5588.    The fundamental principle of reporting bugs usefully is this:
  5589. *report all the facts*.  If you are not sure whether to state a fact or
  5590. leave it out, state it!
  5591.    Often people omit facts because they think they know what causes the
  5592. problem and they conclude that some details don't matter.  Thus, you
  5593. might assume that the name of the variable you use in an example does
  5594. not matter.  Well, probably it doesn't, but one cannot be sure.
  5595. Perhaps the bug is a stray memory reference which happens to fetch from
  5596. the location where that name is stored in memory; perhaps, if the name
  5597. were different, the contents of that location would fool the compiler
  5598. into doing the right thing despite the bug.  Play it safe and give a
  5599. specific, complete example.  That is the easiest thing for you to do,
  5600. and the most helpful.
  5601.    Keep in mind that the purpose of a bug report is to enable someone to
  5602. fix the bug if it is not known.  It isn't very important what happens if
  5603. the bug is already known.  Therefore, always write your bug reports on
  5604. the assumption that the bug is not known.
  5605.    Sometimes people give a few sketchy facts and ask, "Does this ring a
  5606. bell?" This cannot help us fix a bug, so it is rarely helpful.  We
  5607. respond by asking for enough details to enable us to investigate.  You
  5608. might as well expedite matters by sending them to begin with.
  5609. (Besides, there are enough bells ringing around here as it is.)
  5610.    Try to make your bug report self-contained.  If we have to ask you
  5611. for more information, it is best if you include all the previous
  5612. information in your response, as well as the information that was
  5613. missing.
  5614.    Please report each bug in a separate message.  This makes it easier
  5615. for us to track which bugs have been fixed and to forward your bugs
  5616. reports to the appropriate maintainer.
  5617.    Do not compress and encode any part of your bug report using programs
  5618. such as `uuencode'.  If you do so it will slow down the processing of
  5619. your bug.  If you must submit multiple large files, use `shar', which
  5620. allows us to read your message without having to run any decompression
  5621. programs.
  5622.    (As a special exception for GNU Fortran bug-reporting, at least for
  5623. now, if you are sending more than a few lines of code, if your
  5624. program's source file format contains "interesting" things like
  5625. trailing spaces or strange characters, or if you need to include binary
  5626. data files, it is acceptable to put all the files together in a `tar'
  5627. archive, and, whether you need to do that, it is acceptable to then
  5628. compress the single file (`tar' archive or source file) using `gzip'
  5629. and encode it via `uuencode'.  Do not use any MIME stuff--the current
  5630. maintainer can't decode this.  Using `compress' instead of `gzip' is
  5631. acceptable, assuming you have licensed the use of the patented
  5632. algorithm in `compress' from Unisys.)
  5633.    To enable someone to investigate the bug, you should include all
  5634. these things:
  5635.    * The version of GNU Fortran.  You can get this by running `g77'
  5636.      with the `-v' option.  (Ignore any error messages that might be
  5637.      displayed when the linker is run.)
  5638.      Without this, we won't know whether there is any point in looking
  5639.      for the bug in the current version of GNU Fortran.
  5640.    * A complete input file that will reproduce the bug.  If the bug is
  5641.      in the compiler proper (`f771') and you are using the C
  5642.      preprocessor, run your source file through the C preprocessor by
  5643.      doing `g77 -E SOURCEFILE > OUTFILE', then include the contents of
  5644.      OUTFILE in the bug report.  (When you do this, use the same `-I',
  5645.      `-D' or `-U' options that you used in actual compilation.)
  5646.      A single statement is not enough of an example.  In order to
  5647.      compile it, it must be embedded in a complete file of compiler
  5648.      input; and the bug might depend on the details of how this is done.
  5649.      Without a real example one can compile, all anyone can do about
  5650.      your bug report is wish you luck.  It would be futile to try to
  5651.      guess how to provoke the bug.  For example, bugs in register
  5652.      allocation and reloading frequently depend on every little detail
  5653.      of the function they happen in.
  5654.    * Note that you should include with your bug report any files
  5655.      included by the source file (via the `INCLUDE' statement) that you
  5656.      send, and any files they `INCLUDE', and so on.
  5657.      It is not necessary to replace the `INCLUDE' statements with the
  5658.      actual files in the version of the source file that you send, but
  5659.      it might make submitting the bug report easier on the ends.
  5660.      However, be sure to *reproduce* the bug using the *exact* version
  5661.      of the source material you submit, to avoid wild-goose chases.
  5662.    * The command arguments you gave GNU Fortran to compile that example
  5663.      and observe the bug.  For example, did you use `-O'?  To guarantee
  5664.      you won't omit something important, list all the options.
  5665.      If we were to try to guess the arguments, we would probably guess
  5666.      wrong and then we would not encounter the bug.
  5667.    * The type of machine you are using, and the operating system name
  5668.      and version number.  (Much of this information is printed by `g77
  5669.      -v'--if you include that, send along any additional info you have
  5670.      that you don't see clearly represented in that output.)
  5671.    * The operands you gave to the `configure' command when you installed
  5672.      the compiler.
  5673.    * A complete list of any modifications you have made to the compiler
  5674.      source.  (We don't promise to investigate the bug unless it
  5675.      happens in an unmodified compiler.  But if you've made
  5676.      modifications and don't tell us, then you are sending us on a
  5677.      wild-goose chase.)
  5678.      Be precise about these changes.  A description in English is not
  5679.      enough--send a context diff for them.
  5680.      Adding files of your own (such as a machine description for a
  5681.      machine we don't support) is a modification of the compiler source.
  5682.    * Details of any other deviations from the standard procedure for
  5683.      installing GNU Fortran.
  5684.    * A description of what behavior you observe that you believe is
  5685.      incorrect.  For example, "The compiler gets a fatal signal," or,
  5686.      "The assembler instruction at line 208 in the output is incorrect."
  5687.      Of course, if the bug is that the compiler gets a fatal signal,
  5688.      then one can't miss it.  But if the bug is incorrect output, the
  5689.      maintainer might not notice unless it is glaringly wrong.  None of
  5690.      us has time to study all the assembler code from a 50-line Fortran
  5691.      program just on the chance that one instruction might be wrong.
  5692.      We need *you* to do this part!
  5693.      Even if the problem you experience is a fatal signal, you should
  5694.      still say so explicitly.  Suppose something strange is going on,
  5695.      such as, your copy of the compiler is out of synch, or you have
  5696.      encountered a bug in the C library on your system.  (This has
  5697.      happened!)  Your copy might crash and the copy here would not.  If
  5698.      you said to expect a crash, then when the compiler here fails to
  5699.      crash, we would know that the bug was not happening.  If you don't
  5700.      say to expect a crash, then we would not know whether the bug was
  5701.      happening.  We would not be able to draw any conclusion from our
  5702.      observations.
  5703.      If the problem is a diagnostic when building GNU Fortran with some
  5704.      other compiler, say whether it is a warning or an error.
  5705.      Often the observed symptom is incorrect output when your program
  5706.      is run.  Sad to say, this is not enough information unless the
  5707.      program is short and simple.  None of us has time to study a large
  5708.      program to figure out how it would work if compiled correctly,
  5709.      much less which line of it was compiled wrong.  So you will have
  5710.      to do that.  Tell us which source line it is, and what incorrect
  5711.      result happens when that line is executed.  A person who
  5712.      understands the program can find this as easily as finding a bug
  5713.      in the program itself.
  5714.    * If you send examples of assembler code output from GNU Fortran,
  5715.      please use `-g' when you make them.  The debugging information
  5716.      includes source line numbers which are essential for correlating
  5717.      the output with the input.
  5718.    * If you wish to mention something in the GNU Fortran source, refer
  5719.      to it by context, not by line number.
  5720.      The line numbers in the development sources don't match those in
  5721.      your sources.  Your line numbers would convey no convenient
  5722.      information to the maintainers.
  5723.    * Additional information from a debugger might enable someone to
  5724.      find a problem on a machine which he does not have available.
  5725.      However, you need to think when you collect this information if
  5726.      you want it to have any chance of being useful.
  5727.      For example, many people send just a backtrace, but that is never
  5728.      useful by itself.  A simple backtrace with arguments conveys little
  5729.      about GNU Fortran because the compiler is largely data-driven; the
  5730.      same functions are called over and over for different RTL insns,
  5731.      doing different things depending on the details of the insn.
  5732.      Most of the arguments listed in the backtrace are useless because
  5733.      they are pointers to RTL list structure.  The numeric values of the
  5734.      pointers, which the debugger prints in the backtrace, have no
  5735.      significance whatever; all that matters is the contents of the
  5736.      objects they point to (and most of the contents are other such
  5737.      pointers).
  5738.      In addition, most compiler passes consist of one or more loops that
  5739.      scan the RTL insn sequence.  The most vital piece of information
  5740.      about such a loop--which insn it has reached--is usually in a
  5741.      local variable, not in an argument.
  5742.      What you need to provide in addition to a backtrace are the values
  5743.      of the local variables for several stack frames up.  When a local
  5744.      variable or an argument is an RTX, first print its value and then
  5745.      use the GDB command `pr' to print the RTL expression that it points
  5746.      to.  (If GDB doesn't run on your machine, use your debugger to call
  5747.      the function `debug_rtx' with the RTX as an argument.)  In
  5748.      general, whenever a variable is a pointer, its value is no use
  5749.      without the data it points to.
  5750.    Here are some things that are not necessary:
  5751.    * A description of the envelope of the bug.
  5752.      Often people who encounter a bug spend a lot of time investigating
  5753.      which changes to the input file will make the bug go away and which
  5754.      changes will not affect it.
  5755.      This is often time consuming and not very useful, because the way
  5756.      we will find the bug is by running a single example under the
  5757.      debugger with breakpoints, not by pure deduction from a series of
  5758.      examples.  You might as well save your time for something else.
  5759.      Of course, if you can find a simpler example to report *instead* of
  5760.      the original one, that is a convenience.  Errors in the output
  5761.      will be easier to spot, running under the debugger will take less
  5762.      time, etc.  Most GNU Fortran bugs involve just one function, so
  5763.      the most straightforward way to simplify an example is to delete
  5764.      all the function definitions except the one where the bug occurs.
  5765.      Those earlier in the file may be replaced by external declarations
  5766.      if the crucial function depends on them.  (Exception: inline
  5767.      functions may affect compilation of functions defined later in the
  5768.      file.)
  5769.      However, simplification is not vital; if you don't want to do this,
  5770.      report the bug anyway and send the entire test case you used.
  5771.    * In particular, some people insert conditionals `#ifdef BUG' around
  5772.      a statement which, if removed, makes the bug not happen.  These
  5773.      are just clutter; we won't pay any attention to them anyway.
  5774.      Besides, you should send us preprocessor output, and that can't
  5775.      have conditionals.
  5776.    * A patch for the bug.
  5777.      A patch for the bug is useful if it is a good one.  But don't omit
  5778.      the necessary information, such as the test case, on the
  5779.      assumption that a patch is all we need.  We might see problems
  5780.      with your patch and decide to fix the problem another way, or we
  5781.      might not understand it at all.
  5782.      Sometimes with a program as complicated as GNU Fortran it is very
  5783.      hard to construct an example that will make the program follow a
  5784.      certain path through the code.  If you don't send the example, we
  5785.      won't be able to construct one, so we won't be able to verify that
  5786.      the bug is fixed.
  5787.      And if we can't understand what bug you are trying to fix, or why
  5788.      your patch should be an improvement, we won't install it.  A test
  5789.      case will help us to understand.
  5790.      *Note Sending Patches::, for guidelines on how to make it easy for
  5791.      us to understand and install your patches.
  5792.    * A guess about what the bug is or what it depends on.
  5793.      Such guesses are usually wrong.  Even the maintainer can't guess
  5794.      right about such things without first using the debugger to find
  5795.      the facts.
  5796.    * A core dump file.
  5797.      We have no way of examining a core dump for your type of machine
  5798.      unless we have an identical system--and if we do have one, we
  5799.      should be able to reproduce the crash ourselves.
  5800. File: ^.!gcc.docs.fortran.g77,  Node: Sending Patches,  Prev: Bug Reporting,  Up: Bugs
  5801. Sending Patches for GNU Fortran
  5802. ===============================
  5803.    If you would like to write bug fixes or improvements for the GNU
  5804. Fortran compiler, that is very helpful.  Send suggested fixes to the
  5805. bug report mailing list, `fortran@gnu.ai.mit.edu'.
  5806.    Please follow these guidelines so we can study your patches
  5807. efficiently.  If you don't follow these guidelines, your information
  5808. might still be useful, but using it will take extra work.  Maintaining
  5809. GNU Fortran is a lot of work in the best of circumstances, and we can't
  5810. keep up unless you do your best to help.
  5811.    * Send an explanation with your changes of what problem they fix or
  5812.      what improvement they bring about.  For a bug fix, just include a
  5813.      copy of the bug report, and explain why the change fixes the bug.
  5814.      (Referring to a bug report is not as good as including it, because
  5815.      then we will have to look it up, and we have probably already
  5816.      deleted it if we've already fixed the bug.)
  5817.    * Always include a proper bug report for the problem you think you
  5818.      have fixed.  We need to convince ourselves that the change is
  5819.      right before installing it.  Even if it is right, we might have
  5820.      trouble judging it if we don't have a way to reproduce the problem.
  5821.    * Include all the comments that are appropriate to help people
  5822.      reading the source in the future understand why this change was
  5823.      needed.
  5824.    * Don't mix together changes made for different reasons.  Send them
  5825.      *individually*.
  5826.      If you make two changes for separate reasons, then we might not
  5827.      want to install them both.  We might want to install just one.  If
  5828.      you send them all jumbled together in a single set of diffs, we
  5829.      have to do extra work to disentangle them--to figure out which
  5830.      parts of the change serve which purpose.  If we don't have time
  5831.      for this, we might have to ignore your changes entirely.
  5832.      If you send each change as soon as you have written it, with its
  5833.      own explanation, then the two changes never get tangled up, and we
  5834.      can consider each one properly without any extra work to
  5835.      disentangle them.
  5836.      Ideally, each change you send should be impossible to subdivide
  5837.      into parts that we might want to consider separately, because each
  5838.      of its parts gets its motivation from the other parts.
  5839.    * Send each change as soon as that change is finished.  Sometimes
  5840.      people think they are helping us by accumulating many changes to
  5841.      send them all together.  As explained above, this is absolutely
  5842.      the worst thing you could do.
  5843.      Since you should send each change separately, you might as well
  5844.      send it right away.  That gives us the option of installing it
  5845.      immediately if it is important.
  5846.    * Use `diff -c' to make your diffs.  Diffs without context are hard
  5847.      for us to install reliably.  More than that, they make it hard for
  5848.      us to study the diffs to decide whether we want to install them.
  5849.      Unidiff format is better than contextless diffs, but not as easy
  5850.      to read as `-c' format.
  5851.      If you have GNU diff, use `diff -cp', which shows the name of the
  5852.      function that each change occurs in.  (The maintainer of GNU
  5853.      Fortran currently uses `diff -rcp2N'.)
  5854.    * Write the change log entries for your changes.  We get lots of
  5855.      changes, and we don't have time to do all the change log writing
  5856.      ourselves.
  5857.      Read the `ChangeLog' file to see what sorts of information to put
  5858.      in, and to learn the style that we use.  The purpose of the change
  5859.      log is to show people where to find what was changed.  So you need
  5860.      to be specific about what functions you changed; in large
  5861.      functions, it's often helpful to indicate where within the
  5862.      function the change was.
  5863.      On the other hand, once you have shown people where to find the
  5864.      change, you need not explain its purpose.  Thus, if you add a new
  5865.      function, all you need to say about it is that it is new.  If you
  5866.      feel that the purpose needs explaining, it probably does--but the
  5867.      explanation will be much more useful if you put it in comments in
  5868.      the code.
  5869.      If you would like your name to appear in the header line for who
  5870.      made the change, send us the header line.
  5871.    * When you write the fix, keep in mind that we can't install a
  5872.      change that would break other systems.
  5873.      People often suggest fixing a problem by changing
  5874.      machine-independent files such as `toplev.c' to do something
  5875.      special that a particular system needs.  Sometimes it is totally
  5876.      obvious that such changes would break GNU Fortran for almost all
  5877.      users.  We can't possibly make a change like that.  At best it
  5878.      might tell us how to write another patch that would solve the
  5879.      problem acceptably.
  5880.      Sometimes people send fixes that *might* be an improvement in
  5881.      general--but it is hard to be sure of this.  It's hard to install
  5882.      such changes because we have to study them very carefully.  Of
  5883.      course, a good explanation of the reasoning by which you concluded
  5884.      the change was correct can help convince us.
  5885.      The safest changes are changes to the configuration files for a
  5886.      particular machine.  These are safe because they can't create new
  5887.      bugs on other machines.
  5888.      Please help us keep up with the workload by designing the patch in
  5889.      a form that is good to install.
  5890. File: ^.!gcc.docs.fortran.g77,  Node: Service,  Next: Index,  Prev: Bugs,  Up: Top
  5891. How To Get Help with GNU Fortran
  5892. ********************************
  5893.    If you need help installing, using or changing GNU Fortran, there
  5894. are two ways to find it:
  5895.    * Look in the service directory for someone who might help you for a
  5896.      fee.  The service directory is found in the file named `SERVICE'
  5897.      in the GNU CC distribution.
  5898.    * Send a message to `fortran@gnu.ai.mit.edu'.
  5899. File: ^.!gcc.docs.fortran.g77,  Node: Index,  Prev: Service,  Up: Top
  5900. Index
  5901. *****
  5902. * Menu:
  5903. * #define:                              Overall Options.
  5904. * #if:                                  Overall Options.
  5905. * #include:                             Overall Options.
  5906. * %DESCR() intrinsic <1>:               Changes.
  5907. * %DESCR() intrinsic:                   Extensions.
  5908. * %LOC() intrinsic:                     Extensions.
  5909. * %REF() intrinsic:                     Extensions.
  5910. * %VAL() intrinsic:                     Extensions.
  5911. * *N notation:                          Types.
  5912. * --driver option <1>:                  G77 and GCC.
  5913. * --driver option:                      Invoking G77.
  5914. * -fGROUP-intrinsics-hide option:       Overly Convenient Options.
  5915. * -fcaller-saves option:                Optimize Options.
  5916. * -fcase-initcap option:                Fortran Dialect Options.
  5917. * -fcase-lower option:                  Fortran Dialect Options.
  5918. * -fcase-preserve option:               Fortran Dialect Options.
  5919. * -fcase-strict-lower option:           Fortran Dialect Options.
  5920. * -fcase-strict-upper option:           Fortran Dialect Options.
  5921. * -fcase-upper option:                  Fortran Dialect Options.
  5922. * -fdcp-intrinsics-delete option:       Fortran Dialect Options.
  5923. * -fdcp-intrinsics-disable option:      Fortran Dialect Options.
  5924. * -fdcp-intrinsics-enable option:       Fortran Dialect Options.
  5925. * -fdcp-intrinsics-hide option:         Fortran Dialect Options.
  5926. * -fdelayed-branch option:              Optimize Options.
  5927. * -fdollar-ok option:                   Fortran Dialect Options.
  5928. * -fexpensive-optimizations option:     Optimize Options.
  5929. * -ff2c-intrinsics-delete option:       Fortran Dialect Options.
  5930. * -ff2c-intrinsics-disable option:      Fortran Dialect Options.
  5931. * -ff2c-intrinsics-enable option:       Fortran Dialect Options.
  5932. * -ff2c-intrinsics-hide option:         Fortran Dialect Options.
  5933. * -ff2c-library option:                 Code Gen Options.
  5934. * -ff90 option:                         Fortran Dialect Options.
  5935. * -ff90-intrinsics-delete option:       Fortran Dialect Options.
  5936. * -ff90-intrinsics-disable option:      Fortran Dialect Options.
  5937. * -ff90-intrinsics-enable option:       Fortran Dialect Options.
  5938. * -ff90-intrinsics-hide option:         Fortran Dialect Options.
  5939. * -ff90-not-vxt option:                 Fortran Dialect Options.
  5940. * -ffast-math option:                   Optimize Options.
  5941. * -ffixed-line-length-N option:         Fortran Dialect Options.
  5942. * -ffloat-store option:                 Optimize Options.
  5943. * -fforce-addr option:                  Optimize Options.
  5944. * -fforce-mem option:                   Optimize Options.
  5945. * -ffree-form option:                   Fortran Dialect Options.
  5946. * -finit-local-zero option <1>:         Overly Convenient Options.
  5947. * -finit-local-zero option:             Code Gen Options.
  5948. * -fintrin-case-any option:             Fortran Dialect Options.
  5949. * -fintrin-case-initcap option:         Fortran Dialect Options.
  5950. * -fintrin-case-lower option:           Fortran Dialect Options.
  5951. * -fintrin-case-upper option:           Fortran Dialect Options.
  5952. * -fmatch-case-any option:              Fortran Dialect Options.
  5953. * -fmatch-case-initcap option:          Fortran Dialect Options.
  5954. * -fmatch-case-lower option:            Fortran Dialect Options.
  5955. * -fmatch-case-upper option:            Fortran Dialect Options.
  5956. * -fmil-intrinsics-delete option:       Fortran Dialect Options.
  5957. * -fmil-intrinsics-disable option:      Fortran Dialect Options.
  5958. * -fmil-intrinsics-enable option:       Fortran Dialect Options.
  5959. * -fmil-intrinsics-hide option:         Fortran Dialect Options.
  5960. * -fno-automatic option <1>:            Overly Convenient Options.
  5961. * -fno-automatic option:                Code Gen Options.
  5962. * -fno-backslash option:                Fortran Dialect Options.
  5963. * -fno-common option:                   Code Gen Options.
  5964. * -fno-f2c option <1>:                  Faster Programs.
  5965. * -fno-f2c option:                      Code Gen Options.
  5966. * -fno-fixed-form option:               Fortran Dialect Options.
  5967. * -fno-ident option:                    Code Gen Options.
  5968. * -fno-inline option:                   Optimize Options.
  5969. * -fno-second-underscore option:        Code Gen Options.
  5970. * -fno-ugly-args option:                Warning Options.
  5971. * -fno-ugly-init option:                Warning Options.
  5972. * -fno-underscoring option:             Code Gen Options.
  5973. * -fpack-struct option:                 Code Gen Options.
  5974. * -fpcc-struct-return option:           Code Gen Options.
  5975. * -fpedantic option:                    Warning Options.
  5976. * -freg-struct-return option:           Code Gen Options.
  5977. * -frerun-cse-after-loop option:        Optimize Options.
  5978. * -fschedule-insns option:              Optimize Options.
  5979. * -fschedule-insns2 option:             Optimize Options.
  5980. * -fset-g77-defaults option:            Overall Options.
  5981. * -fshort-double option:                Code Gen Options.
  5982. * -fsource-case-lower option:           Fortran Dialect Options.
  5983. * -fsource-case-preserve option:        Fortran Dialect Options.
  5984. * -fsource-case-upper option:           Fortran Dialect Options.
  5985. * -fstrength-reduce option:             Optimize Options.
  5986. * -fsymbol-case-any option:             Fortran Dialect Options.
  5987. * -fsymbol-case-initcap option:         Fortran Dialect Options.
  5988. * -fsymbol-case-lower option:           Fortran Dialect Options.
  5989. * -fsymbol-case-upper option:           Fortran Dialect Options.
  5990. * -fsyntax-only option:                 Warning Options.
  5991. * -fugly option <1>:                    Overly Convenient Options.
  5992. * -fugly option:                        Warning Options.
  5993. * -funix-intrinsics-delete option:      Fortran Dialect Options.
  5994. * -funix-intrinsics-disable option:     Fortran Dialect Options.
  5995. * -funix-intrinsics-enable option:      Fortran Dialect Options.
  5996. * -funix-intrinsics-hide option:        Fortran Dialect Options.
  5997. * -funroll-all-loops option:            Optimize Options.
  5998. * -funroll-loops option:                Optimize Options.
  5999. * -fversion option:                     Overall Options.
  6000. * -fvxt-intrinsics-delete option:       Fortran Dialect Options.
  6001. * -fvxt-intrinsics-disable option:      Fortran Dialect Options.
  6002. * -fvxt-intrinsics-enable option:       Fortran Dialect Options.
  6003. * -fvxt-intrinsics-hide option:         Fortran Dialect Options.
  6004. * -fvxt-not-f90 option:                 Fortran Dialect Options.
  6005. * -fzeros option:                       Code Gen Options.
  6006. * -g option:                            Debugging Options.
  6007. * -I- option:                           Directory Options.
  6008. * -Idir option:                         Directory Options.
  6009. * -pedantic option:                     Warning Options.
  6010. * -pedantic-errors option:              Warning Options.
  6011. * -u option:                            Warning Options.
  6012. * -v option:                            G77 and GCC.
  6013. * -w option:                            Warning Options.
  6014. * -Waggregate-return option:            Warning Options.
  6015. * -Wall option:                         Warning Options.
  6016. * -Wcomment option:                     Warning Options.
  6017. * -Wconversion option:                  Warning Options.
  6018. * -Werror option:                       Warning Options.
  6019. * -Wformat option:                      Warning Options.
  6020. * -Wid-clash-LEN option:                Warning Options.
  6021. * -Wimplicit option:                    Warning Options.
  6022. * -Wlarger-than-LEN option:             Warning Options.
  6023. * -Wparentheses option:                 Warning Options.
  6024. * -Wredundant-decls option:             Warning Options.
  6025. * -Wshadow option:                      Warning Options.
  6026. * -Wsurprising option:                  Warning Options.
  6027. * -Wswitch option:                      Warning Options.
  6028. * -Wtraditional option:                 Warning Options.
  6029. * -Wuninitialized option:               Warning Options.
  6030. * -Wunused option:                      Warning Options.
  6031. * .F:                                   Overall Options.
  6032. * .fpp:                                 Overall Options.
  6033. * /WARNINGS=DECLARATIONS switch:        Warning Options.
  6034. * 64-bit systems:                       Alpha Problems.
  6035. * bison:                                Missing bison?.
  6036. * g77, installation of:                 Installation of Binaries.
  6037. * gcc versions supported by g77:        Merging Distributions.
  6038. * gcc, installation of:                 Installation of Binaries.
  6039. * gdb support:                          But-bugs.
  6040. * makeinfo:                             Missing makeinfo?.
  6041. * ABORT() intrinsic:                    Fortran Dialect Options.
  6042. * ACCEPT statement:                     Missing Features.
  6043. * adjustable arrays:                    Adjustable Arrays.
  6044. * aggregate initialization:             Large Initialization.
  6045. * all warnings:                         Warning Options.
  6046. * Alpha, bugs:                          Alpha Problems.
  6047. * alternate entry points:               Alternate Entry Points.
  6048. * alternate returns:                    Alternate Returns.
  6049. * AND intrinsic:                        Missing Features.
  6050. * ANSI FORTRAN 77 support:              Standard Support.
  6051. * arguments, unused:                    Warning Options.
  6052. * array ordering:                       Arrays.
  6053. * arrays:                               Arrays.
  6054. * arrays, adjustable:                   Adjustable Arrays.
  6055. * arrays, automatic:                    Adjustable Arrays.
  6056. * arrays, dimensioning:                 Adjustable Arrays.
  6057. * as command:                           What is GNU Fortran?.
  6058. * assembler:                            What is GNU Fortran?.
  6059. * assembly code:                        What is GNU Fortran?.
  6060. * assembly code, invalid:               Bug Criteria.
  6061. * ASSIGN statement:                     Assigned Statement Labels.
  6062. * assigned statement labels:            Assigned Statement Labels.
  6063. * automatic arrays:                     Adjustable Arrays.
  6064. * back end, gcc:                        What is GNU Fortran?.
  6065. * backslash <1>:                        Fortran Dialect Options.
  6066. * backslash:                            Non-bugs.
  6067. * backtrace for bug reports:            Bug Reporting.
  6068. * basic concepts:                       What is GNU Fortran?.
  6069. * beginners:                            Getting Started.
  6070. * binaries, distributing:               Distributing Binaries.
  6071. * bit patterns:                         Floating-point Bit Patterns.
  6072. * block data:                           Disappointments.
  6073. * block data and libraries:             Block Data and Libraries.
  6074. * BLOCK DATA statement <1>:             Block Data and Libraries.
  6075. * BLOCK DATA statement:                 Disappointments.
  6076. * bootstrap build:                      Bootstrap Build.
  6077. * bug criteria:                         Bug Criteria.
  6078. * bug report mailing lists:             Bug Lists.
  6079. * bugs <1>:                             What is GNU Fortran?.
  6080. * bugs:                                 Bugs.
  6081. * bugs, known:                          Trouble.
  6082. * build, bootstrap:                     Bootstrap Build.
  6083. * build, straight:                      Straight Build.
  6084. * building g77:                         Building gcc.
  6085. * building gcc:                         Building gcc.
  6086. * but-bugs:                             But-bugs.
  6087. * C preprocessor:                       Overall Options.
  6088. * C routines calling Fortran:           Debugging and Interfacing.
  6089. * calling C routines:                   Debugging and Interfacing.
  6090. * card image:                           Fortran Dialect Options.
  6091. * carriage returns:                     Source Form.
  6092. * case sensitivity:                     Case Sensitivity.
  6093. * cc1 program:                          What is GNU Fortran?.
  6094. * cc1plus program:                      What is GNU Fortran?.
  6095. * changes, user-visible:                Changes.
  6096. * character constants <1>:              Fortran Dialect Options.
  6097. * character constants <1>:              Distensions.
  6098. * character constants <1>:              Dialects.
  6099. * character constants:                  Character and Hollerith Constants.
  6100. * character set:                        Fortran Dialect Options.
  6101. * characters, comment:                  Dialects.
  6102. * characters, continuation:             Dialects.
  6103. * CLOSE statement:                      Missing Features.
  6104. * code generation conventions:          Code Gen Options.
  6105. * code generator:                       What is GNU Fortran?.
  6106. * code, assembly:                       What is GNU Fortran?.
  6107. * code, distributing:                   Distributing Binaries.
  6108. * code, in-line:                        What is GNU Fortran?.
  6109. * code, legacy:                         Collected Fortran Wisdom.
  6110. * code, machine:                        What is GNU Fortran?.
  6111. * code, modifying:                      Unpacking.
  6112. * code, object:                         Object Compatibility.
  6113. * code, source <1>:                     What is GNU Fortran?.
  6114. * code, source <1>:                     Case Sensitivity.
  6115. * code, source <1>:                     Unpacking.
  6116. * code, source:                         Source Form.
  6117. * code, stack variables:                Maximum Stackable Size.
  6118. * code, user:                           But-bugs.
  6119. * code, writing:                        Collected Fortran Wisdom.
  6120. * column-major ordering:                Arrays.
  6121. * command options:                      Invoking G77.
  6122. * commands, as:                         What is GNU Fortran?.
  6123. * commands, f77:                        Installing f77.
  6124. * commands, g77 <1>:                    G77 and GCC.
  6125. * commands, g77:                        What is GNU Fortran?.
  6126. * commands, gcc <1>:                    G77 and GCC.
  6127. * commands, gcc:                        What is GNU Fortran?.
  6128. * commands, gdb:                        What is GNU Fortran?.
  6129. * commands, ld:                         What is GNU Fortran?.
  6130. * comment character:                    Dialects.
  6131. * COMMON blocks:                        Debugging Options.
  6132. * common blocks:                        Common Blocks.
  6133. * common blocks, large:                 But-bugs.
  6134. * COMMON statement <1>:                 Common Blocks.
  6135. * COMMON statement:                     Disappointments.
  6136. * compatibility <1>:                    Object Compatibility.
  6137. * compatibility <1>:                    Block Data and Libraries.
  6138. * compatibility:                        Faster Programs.
  6139. * compatibility, f2c:                   Code Gen Options.
  6140. * compilation, in-line:                 Optimize Options.
  6141. * compilation, pedantic:                Pedantic Compilation.
  6142. * compiler bugs, reporting:             Bug Reporting.
  6143. * compilers:                            What is GNU Fortran?.
  6144. * compilers, compatibility:             Object Compatibility.
  6145. * compiling programs:                   G77 and GCC.
  6146. * COMPLEX intrinsics:                   Fortran Dialect Options.
  6147. * COMPLEX type:                         Types.
  6148. * components of g77:                    What is GNU Fortran?.
  6149. * concepts, basic:                      What is GNU Fortran?.
  6150. * conformance, IEEE:                    Optimize Options.
  6151. * constants:                            Constants.
  6152. * constants, character <1>:             Dialects.
  6153. * constants, character <1>:             Distensions.
  6154. * constants, character:                 Character and Hollerith Constants.
  6155. * constants, Hollerith <1>:             Distensions.
  6156. * constants, Hollerith <1>:             Character and Hollerith Constants.
  6157. * constants, Hollerith:                 Changes.
  6158. * constants, octal:                     Dialects.
  6159. * constants, typeless:                  Changes.
  6160. * continuation character:               Dialects.
  6161. * contributors:                         Contributors.
  6162. * core dump:                            Bug Criteria.
  6163. * cpp preprocessor:                     Overall Options.
  6164. * cpp program <1>:                      Bug Reporting.
  6165. * cpp program <1>:                      Preprocessor Options.
  6166. * cpp program <1>:                      What is GNU Fortran?.
  6167. * cpp program:                          Overall Options.
  6168. * Cray pointers:                        Missing Features.
  6169. * creating patch files:                 Merging Distributions.
  6170. * credits:                              Contributors.
  6171. * cross-compilation:                    Cross-compiler Problems.
  6172. * cross-compiler, building:             Floating-point Bit Patterns.
  6173. * DATA statement:                       Code Gen Options.
  6174. * data types:                           Types.
  6175. * debugger:                             What is GNU Fortran?.
  6176. * debugging <1>:                        Main Program Unit.
  6177. * debugging:                            Debugging and Interfacing.
  6178. * debugging information options:        Debugging Options.
  6179. * debug_rtx:                            Bug Reporting.
  6180. * deleted intrinsics:                   Intrinsics.
  6181. * diagnostics, incorrect:               What is GNU Fortran?.
  6182. * dialect options:                      Fortran Dialect Options.
  6183. * dialects of language:                 Dialects.
  6184. * Digital Fortran features:             Fortran Dialect Options.
  6185. * DIMENSION statement <1>:              Adjustable Arrays.
  6186. * DIMENSION statement:                  Arrays.
  6187. * dimensioning arrays:                  Adjustable Arrays.
  6188. * directory options:                    Directory Options.
  6189. * directory search paths for inclusion: Directory Options.
  6190. * directory, updating info:             Updating Documentation.
  6191. * disabled intrinsics:                  Intrinsics.
  6192. * disposition of files:                 Missing Features.
  6193. * distensions:                          Distensions.
  6194. * distributions, unpacking:             Unpacking.
  6195. * distributions, why separate:          Merging Distributions.
  6196. * DO statement <1>:                     Loops.
  6197. * DO statement:                         Warning Options.
  6198. * documentation:                        Updating Documentation.
  6199. * dollar sign:                          Fortran Dialect Options.
  6200. * DOUBLE COMPLEX type:                  Types.
  6201. * DOUBLE PRECISION type:                Types.
  6202. * double quotes:                        Dialects.
  6203. * driver, gcc command as:               What is GNU Fortran?.
  6204. * dummies, unused:                      Warning Options.
  6205. * effecting IMPLICIT NONE:              Warning Options.
  6206. * enabled intrinsics:                   Intrinsics.
  6207. * entry points:                         Alternate Entry Points.
  6208. * ENTRY statement:                      Alternate Entry Points.
  6209. * environment variables:                Environment Variables.
  6210. * EQUIVALENCE areas:                    Debugging Options.
  6211. * equivalence areas:                    Local Equivalence Areas.
  6212. * EQUIVALENCE statement:                Local Equivalence Areas.
  6213. * error messages:                       Warnings and Errors.
  6214. * error messages, incorrect:            What is GNU Fortran?.
  6215. * errors, linker:                       But-bugs.
  6216. * exclamation points:                   Dialects.
  6217. * executable file:                      What is GNU Fortran?.
  6218. * EXIT() intrinsic:                     Fortran Dialect Options.
  6219. * extended-source option:               Fortran Dialect Options.
  6220. * extensions:                           Extensions.
  6221. * extensions, file name:                Overall Options.
  6222. * extensions, VXT:                      Dialects.
  6223. * extra warnings:                       Warning Options.
  6224. * f2c compatibility <1>:                Debugging and Interfacing.
  6225. * f2c compatibility <1>:                Code Gen Options.
  6226. * f2c compatibility <1>:                Block Data and Libraries.
  6227. * f2c compatibility <1>:                Faster Programs.
  6228. * f2c compatibility:                    Object Compatibility.
  6229. * f2c intrinsics:                       Fortran Dialect Options.
  6230. * F2CLIBOK:                             Installing f2c.
  6231. * F2C_INSTALL_FLAG:                     Installing f2c.
  6232. * f77 command:                          Installing f77.
  6233. * f77 support:                          Non-bugs.
  6234. * f771 program:                         What is GNU Fortran?.
  6235. * f771, linking error for:              General Problems.
  6236. * F77_INSTALL_FLAG:                     Installing f77.
  6237. * fatal signal:                         Bug Criteria.
  6238. * features, ugly <1>:                   Distensions.
  6239. * features, ugly:                       Warning Options.
  6240. * FFE:                                  What is GNU Fortran?.
  6241. * FFECOM_sizeMAXSTACKITEM:              Maximum Stackable Size.
  6242. * file format not recognized:           What is GNU Fortran?.
  6243. * file name extension:                  Overall Options.
  6244. * file name suffix:                     Overall Options.
  6245. * file type:                            Overall Options.
  6246. * file, source:                         What is GNU Fortran?.
  6247. * files, executable:                    What is GNU Fortran?.
  6248. * files, source:                        Source Form.
  6249. * fixed form <1>:                       Source Form.
  6250. * fixed form:                           Fortran Dialect Options.
  6251. * fixed-form line length:               Fortran Dialect Options.
  6252. * floating-point bit patterns:          Floating-point Bit Patterns.
  6253. * FLUSH() intrinsic:                    Fortran Dialect Options.
  6254. * FORMAT statement:                     Missing Features.
  6255. * Fortran 90 features <1>:              Fortran Dialect Options.
  6256. * Fortran 90 features <1>:              Dialects.
  6257. * Fortran 90 features:                  Fortran Dialect Options.
  6258. * Fortran 90 intrinsics:                Fortran Dialect Options.
  6259. * Fortran 90 support:                   Missing Features.
  6260. * Fortran preprocessor:                 Overall Options.
  6261. * free form <1>:                        Fortran Dialect Options.
  6262. * free form:                            Source Form.
  6263. * front end, g77:                       What is GNU Fortran?.
  6264. * FSF, funding the:                     Funding GNU Fortran.
  6265. * FUNCTION statement <1>:               Functions.
  6266. * FUNCTION statement:                   Procedures.
  6267. * functions:                            Functions.
  6268. * functions, intrinsic:                 Fortran Dialect Options.
  6269. * funding improvements:                 Funding GNU Fortran.
  6270. * funding the FSF:                      Funding GNU Fortran.
  6271. * g77 command <1>:                      What is GNU Fortran?.
  6272. * g77 command:                          G77 and GCC.
  6273. * g77 front end:                        What is GNU Fortran?.
  6274. * g77 options, -driver:                 G77 and GCC.
  6275. * g77 options, -v:                      G77 and GCC.
  6276. * g77 options, driver:                  Invoking G77.
  6277. * g77, components of:                   What is GNU Fortran?.
  6278. * GBE <1>:                              What is GNU Fortran?.
  6279. * GBE:                                  General Problems.
  6280. * gcc back end:                         What is GNU Fortran?.
  6281. * gcc command <1>:                      G77 and GCC.
  6282. * gcc command:                          What is GNU Fortran?.
  6283. * gcc command as driver:                What is GNU Fortran?.
  6284. * gcc not recognizing Fortran source:   What is GNU Fortran?.
  6285. * gdb command:                          What is GNU Fortran?.
  6286. * GETARG() intrinsic:                   Main Program Unit.
  6287. * getting started:                      Getting Started.
  6288. * GNU Back End (GBE):                   What is GNU Fortran?.
  6289. * GNU C required:                       General Problems.
  6290. * GNU Fortran command options:          Invoking G77.
  6291. * GNU Fortran Front End (FFE):          What is GNU Fortran?.
  6292. * GOTO statement:                       Assigned Statement Labels.
  6293. * groups of intrinsics:                 Intrinsics.
  6294. * hidden intrinsics:                    Intrinsics.
  6295. * Hollerith constants <1>:              Character and Hollerith Constants.
  6296. * Hollerith constants <1>:              Fortran Dialect Options.
  6297. * Hollerith constants <1>:              Distensions.
  6298. * Hollerith constants <1>:              Changes.
  6299. * Hollerith constants:                  Distensions.
  6300. * IARGC() intrinsic:                    Main Program Unit.
  6301. * IEEE conformance:                     Optimize Options.
  6302. * IMPLICIT CHARACTER*(*) statement:     Disappointments.
  6303. * implicit declaration, warning:        Warning Options.
  6304. * IMPLICIT NONE, similar effect:        Warning Options.
  6305. * improvements, funding:                Funding GNU Fortran.
  6306. * in-line code:                         What is GNU Fortran?.
  6307. * in-line compilation:                  Optimize Options.
  6308. * INCLUDE statement <1>:                Preprocessor Options.
  6309. * INCLUDE statement <1>:                Bug Reporting.
  6310. * INCLUDE statement:                    Directory Options.
  6311. * included files:                       Bug Reporting.
  6312. * inclusion, directory search paths for: Directory Options.
  6313. * incorrect diagnostics:                What is GNU Fortran?.
  6314. * incorrect error messages:             What is GNU Fortran?.
  6315. * incorrect use of language:            What is GNU Fortran?.
  6316. * info, updating directory:             Updating Documentation.
  6317. * initialization of local variables:    Code Gen Options.
  6318. * INQUIRE statement:                    Missing Features.
  6319. * installation of binaries:             Installation of Binaries.
  6320. * installation problems:                Problems Installing.
  6321. * installation trouble:                 Trouble.
  6322. * installing GNU Fortran:               Installation.
  6323. * installing, checking before:          Pre-installation Checks.
  6324. * INTEGER type:                         Types.
  6325. * INTEGER*2 support:                    Missing Features.
  6326. * interfacing:                          Debugging and Interfacing.
  6327. * intrinsic functions:                  Fortran Dialect Options.
  6328. * intrinsic subroutines:                Fortran Dialect Options.
  6329. * intrinsics, %DESCR() <1>:             Extensions.
  6330. * intrinsics, %DESCR():                 Changes.
  6331. * intrinsics, %LOC():                   Extensions.
  6332. * intrinsics, %REF():                   Extensions.
  6333. * intrinsics, %VAL():                   Extensions.
  6334. * intrinsics, ABORT():                  Fortran Dialect Options.
  6335. * intrinsics, AND:                      Missing Features.
  6336. * intrinsics, COMPLEX:                  Fortran Dialect Options.
  6337. * intrinsics, deleted:                  Intrinsics.
  6338. * intrinsics, disabled:                 Intrinsics.
  6339. * intrinsics, enabled:                  Intrinsics.
  6340. * intrinsics, EXIT():                   Fortran Dialect Options.
  6341. * intrinsics, f2c:                      Fortran Dialect Options.
  6342. * intrinsics, FLUSH():                  Fortran Dialect Options.
  6343. * intrinsics, Fortran 90:               Fortran Dialect Options.
  6344. * intrinsics, GETARG():                 Main Program Unit.
  6345. * intrinsics, groups:                   Intrinsics.
  6346. * intrinsics, groups of:                Intrinsics.
  6347. * intrinsics, hidden:                   Intrinsics.
  6348. * intrinsics, IARGC():                  Main Program Unit.
  6349. * intrinsics, LOC():                    Extensions.
  6350. * intrinsics, MIL-STD 1753:             Fortran Dialect Options.
  6351. * intrinsics, OR:                       Missing Features.
  6352. * intrinsics, SHIFT:                    Missing Features.
  6353. * intrinsics, side effects of:          Fortran Dialect Options.
  6354. * intrinsics, SIGNAL():                 Fortran Dialect Options.
  6355. * intrinsics, SYSTEM():                 Fortran Dialect Options.
  6356. * intrinsics, UNIX:                     Fortran Dialect Options.
  6357. * intrinsics, VXT:                      Fortran Dialect Options.
  6358. * Introduction:                         Top.
  6359. * invalid assembly code:                Bug Criteria.
  6360. * invalid input:                        Bug Criteria.
  6361. * KIND= notation:                       Types.
  6362. * known causes of trouble:              Trouble.
  6363. * language dialect options:             Fortran Dialect Options.
  6364. * language dialects:                    Dialects.
  6365. * language extensions:                  Extensions.
  6366. * language, incorrect use of:           What is GNU Fortran?.
  6367. * LANGUAGES:                            Building gcc.
  6368. * large common blocks:                  But-bugs.
  6369. * large initialization:                 Large Initialization.
  6370. * ld can't find strange names:          But-bugs.
  6371. * ld can't find _main:                  But-bugs.
  6372. * ld can't find _strtoul:               General Problems.
  6373. * ld command:                           What is GNU Fortran?.
  6374. * ld error for f771:                    General Problems.
  6375. * ld error for user code:               But-bugs.
  6376. * ld errors:                            But-bugs.
  6377. * legacy code:                          Collected Fortran Wisdom.
  6378. * length of source lines:               Fortran Dialect Options.
  6379. * letters, lowercase:                   Case Sensitivity.
  6380. * letters, uppercase:                   Case Sensitivity.
  6381. * libf2c library:                       What is GNU Fortran?.
  6382. * libraries:                            What is GNU Fortran?.
  6383. * libraries, containing BLOCK DATA:     Block Data and Libraries.
  6384. * libraries, libf2c:                    What is GNU Fortran?.
  6385. * line length:                          Fortran Dialect Options.
  6386. * linker errors:                        But-bugs.
  6387. * linking:                              What is GNU Fortran?.
  6388. * linking error for f771:               General Problems.
  6389. * linking error for user code:          But-bugs.
  6390. * LOC() intrinsic:                      Extensions.
  6391. * local equivalence areas:              Local Equivalence Areas.
  6392. * LOGICAL type:                         Types.
  6393. * LOGICAL*1 support:                    Missing Features.
  6394. * loops, speeding up:                   Optimize Options.
  6395. * loops, unrolling:                     Optimize Options.
  6396. * lowercase letters:                    Case Sensitivity.
  6397. * machine code:                         What is GNU Fortran?.
  6398. * main program unit, debugging:         Main Program Unit.
  6399. * main():                               Main Program Unit.
  6400. * MAIN__():                             Main Program Unit.
  6401. * MAP statement:                        Missing Features.
  6402. * maximum stackable size:               Maximum Stackable Size.
  6403. * memory utilization:                   Large Initialization.
  6404. * merging distributions:                Merging Distributions.
  6405. * messages, warning:                    Warning Options.
  6406. * messages, warning and error:          Warnings and Errors.
  6407. * MIL-STD 1753:                         Fortran Dialect Options.
  6408. * missing bison:                        Missing bison?.
  6409. * missing makeinfo:                     Missing makeinfo?.
  6410. * missing debug features:               Debugging Options.
  6411. * mistakes:                             What is GNU Fortran?.
  6412. * modifying g77:                        Unpacking.
  6413. * NAMELIST statement:                   Extensions.
  6414. * naming conflicts:                     Disappointments.
  6415. * native compiler:                      Installing f77.
  6416. * negative forms of options:            Invoking G77.
  6417. * new users:                            Getting Started.
  6418. * newbies:                              Getting Started.
  6419. * null byte, trailing:                  Character and Hollerith Constants.
  6420. * number of trips:                      Loops.
  6421. * object code:                          Object Compatibility.
  6422. * octal constants:                      Dialects.
  6423. * OPEN statement:                       Missing Features.
  6424. * optimizations, Pentium:               Unpacking.
  6425. * optimize options:                     Optimize Options.
  6426. * options to control warnings:          Warning Options.
  6427. * options, -driver <1>:                 G77 and GCC.
  6428. * options, -driver:                     Invoking G77.
  6429. * options, -fGROUP-intrinsics-hide:     Overly Convenient Options.
  6430. * options, -fcaller-saves:              Optimize Options.
  6431. * options, -fcase-initcap:              Fortran Dialect Options.
  6432. * options, -fcase-lower:                Fortran Dialect Options.
  6433. * options, -fcase-preserve:             Fortran Dialect Options.
  6434. * options, -fcase-strict-lower:         Fortran Dialect Options.
  6435. * options, -fcase-strict-upper:         Fortran Dialect Options.
  6436. * options, -fcase-upper:                Fortran Dialect Options.
  6437. * options, -fdcp-intrinsics-delete:     Fortran Dialect Options.
  6438. * options, -fdcp-intrinsics-disable:    Fortran Dialect Options.
  6439. * options, -fdcp-intrinsics-enable:     Fortran Dialect Options.
  6440. * options, -fdcp-intrinsics-hide:       Fortran Dialect Options.
  6441. * options, -fdelayed-branch:            Optimize Options.
  6442. * options, -fdollar-ok:                 Fortran Dialect Options.
  6443. * options, -fexpensive-optimizations:   Optimize Options.
  6444. * options, -ff2c-intrinsics-delete:     Fortran Dialect Options.
  6445. * options, -ff2c-intrinsics-disable:    Fortran Dialect Options.
  6446. * options, -ff2c-intrinsics-enable:     Fortran Dialect Options.
  6447. * options, -ff2c-intrinsics-hide:       Fortran Dialect Options.
  6448. * options, -ff2c-library:               Code Gen Options.
  6449. * options, -ff90:                       Fortran Dialect Options.
  6450. * options, -ff90-intrinsics-delete:     Fortran Dialect Options.
  6451. * options, -ff90-intrinsics-disable:    Fortran Dialect Options.
  6452. * options, -ff90-intrinsics-enable:     Fortran Dialect Options.
  6453. * options, -ff90-intrinsics-hide:       Fortran Dialect Options.
  6454. * options, -ff90-not-vxt:               Fortran Dialect Options.
  6455. * options, -ffast-math:                 Optimize Options.
  6456. * options, -ffixed-line-length-N:       Fortran Dialect Options.
  6457. * options, -ffloat-store:               Optimize Options.
  6458. * options, -fforce-addr:                Optimize Options.
  6459. * options, -fforce-mem:                 Optimize Options.
  6460. * options, -ffree-form:                 Fortran Dialect Options.
  6461. * options, -finit-local-zero <1>:       Overly Convenient Options.
  6462. * options, -finit-local-zero:           Code Gen Options.
  6463. * options, -fintrin-case-any:           Fortran Dialect Options.
  6464. * options, -fintrin-case-initcap:       Fortran Dialect Options.
  6465. * options, -fintrin-case-lower:         Fortran Dialect Options.
  6466. * options, -fintrin-case-upper:         Fortran Dialect Options.
  6467. * options, -fmatch-case-any:            Fortran Dialect Options.
  6468. * options, -fmatch-case-initcap:        Fortran Dialect Options.
  6469. * options, -fmatch-case-lower:          Fortran Dialect Options.
  6470. * options, -fmatch-case-upper:          Fortran Dialect Options.
  6471. * options, -fmil-intrinsics-delete:     Fortran Dialect Options.
  6472. * options, -fmil-intrinsics-disable:    Fortran Dialect Options.
  6473. * options, -fmil-intrinsics-enable:     Fortran Dialect Options.
  6474. * options, -fmil-intrinsics-hide:       Fortran Dialect Options.
  6475. * options, -fno-automatic <1>:          Overly Convenient Options.
  6476. * options, -fno-automatic:              Code Gen Options.
  6477. * options, -fno-backslash:              Fortran Dialect Options.
  6478. * options, -fno-common:                 Code Gen Options.
  6479. * options, -fno-f2c <1>:                Code Gen Options.
  6480. * options, -fno-f2c:                    Faster Programs.
  6481. * options, -fno-fixed-form:             Fortran Dialect Options.
  6482. * options, -fno-ident:                  Code Gen Options.
  6483. * options, -fno-inline:                 Optimize Options.
  6484. * options, -fno-second-underscore:      Code Gen Options.
  6485. * options, -fno-ugly-args:              Warning Options.
  6486. * options, -fno-ugly-init:              Warning Options.
  6487. * options, -fno-underscoring:           Code Gen Options.
  6488. * options, -fpack-struct:               Code Gen Options.
  6489. * options, -fpcc-struct-return:         Code Gen Options.
  6490. * options, -fpedantic:                  Warning Options.
  6491. * options, -freg-struct-return:         Code Gen Options.
  6492. * options, -frerun-cse-after-loop:      Optimize Options.
  6493. * options, -fschedule-insns:            Optimize Options.
  6494. * options, -fschedule-insns2:           Optimize Options.
  6495. * options, -fset-g77-defaults:          Overall Options.
  6496. * options, -fshort-double:              Code Gen Options.
  6497. * options, -fsource-case-lower:         Fortran Dialect Options.
  6498. * options, -fsource-case-preserve:      Fortran Dialect Options.
  6499. * options, -fsource-case-upper:         Fortran Dialect Options.
  6500. * options, -fstrength-reduce:           Optimize Options.
  6501. * options, -fsymbol-case-any:           Fortran Dialect Options.
  6502. * options, -fsymbol-case-initcap:       Fortran Dialect Options.
  6503. * options, -fsymbol-case-lower:         Fortran Dialect Options.
  6504. * options, -fsymbol-case-upper:         Fortran Dialect Options.
  6505. * options, -fsyntax-only:               Warning Options.
  6506. * options, -fugly <1>:                  Overly Convenient Options.
  6507. * options, -fugly:                      Warning Options.
  6508. * options, -funix-intrinsics-delete:    Fortran Dialect Options.
  6509. * options, -funix-intrinsics-disable:   Fortran Dialect Options.
  6510. * options, -funix-intrinsics-enable:    Fortran Dialect Options.
  6511. * options, -funix-intrinsics-hide:      Fortran Dialect Options.
  6512. * options, -funroll-all-loops:          Optimize Options.
  6513. * options, -funroll-loops:              Optimize Options.
  6514. * options, -fversion:                   Overall Options.
  6515. * options, -fvxt-intrinsics-delete:     Fortran Dialect Options.
  6516. * options, -fvxt-intrinsics-disable:    Fortran Dialect Options.
  6517. * options, -fvxt-intrinsics-enable:     Fortran Dialect Options.
  6518. * options, -fvxt-intrinsics-hide:       Fortran Dialect Options.
  6519. * options, -fvxt-not-f90:               Fortran Dialect Options.
  6520. * options, -fzeros:                     Code Gen Options.
  6521. * options, -g:                          Debugging Options.
  6522. * options, -I-:                         Directory Options.
  6523. * options, -Idir:                       Directory Options.
  6524. * options, -pedantic:                   Warning Options.
  6525. * options, -pedantic-errors:            Warning Options.
  6526. * options, -v:                          G77 and GCC.
  6527. * options, -W:                          Warning Options.
  6528. * options, -Waggregate-return:          Warning Options.
  6529. * options, -Wall:                       Warning Options.
  6530. * options, -Wcomment:                   Warning Options.
  6531. * options, -Wconversion:                Warning Options.
  6532. * options, -Werror:                     Warning Options.
  6533. * options, -Wformat:                    Warning Options.
  6534. * options, -Wid-clash-LEN:              Warning Options.
  6535. * options, -Wimplicit:                  Warning Options.
  6536. * options, -Wlarger-than-LEN:           Warning Options.
  6537. * options, -Wparentheses:               Warning Options.
  6538. * options, -Wredundant-decls:           Warning Options.
  6539. * options, -Wshadow:                    Warning Options.
  6540. * options, -Wsurprising:                Warning Options.
  6541. * options, -Wswitch:                    Warning Options.
  6542. * options, -Wtraditional:               Warning Options.
  6543. * options, -Wuninitialized:             Warning Options.
  6544. * options, -Wunused:                    Warning Options.
  6545. * options, code generation:             Code Gen Options.
  6546. * options, debugging:                   Debugging Options.
  6547. * options, dialect:                     Fortran Dialect Options.
  6548. * options, directory search:            Directory Options.
  6549. * options, GNU Fortran command:         Invoking G77.
  6550. * options, negative forms:              Invoking G77.
  6551. * options, optimization:                Optimize Options.
  6552. * options, overall:                     Overall Options.
  6553. * options, overly convenient:           Overly Convenient Options.
  6554. * options, preprocessor:                Preprocessor Options.
  6555. * OR intrinsic:                         Missing Features.
  6556. * order of evaluation, side effects:    Non-bugs.
  6557. * ordering, array:                      Arrays.
  6558. * overall options:                      Overall Options.
  6559. * overflow:                             Warning Options.
  6560. * overly convenient options:            Overly Convenient Options.
  6561. * packages:                             Unpacking.
  6562. * PARAMETER statement:                  Missing Features.
  6563. * parameters, unused:                   Warning Options.
  6564. * patch files:                          General Problems.
  6565. * patch files, creating:                Merging Distributions.
  6566. * pedantic compilation:                 Pedantic Compilation.
  6567. * Pentium optimizations:                Unpacking.
  6568. * POINTER statement:                    Missing Features.
  6569. * pre-installation checks:              Pre-installation Checks.
  6570. * preprocessor <1>:                     Bug Reporting.
  6571. * preprocessor <1>:                     What is GNU Fortran?.
  6572. * preprocessor:                         Overall Options.
  6573. * preprocessor options:                 Preprocessor Options.
  6574. * prerequisites:                        Prerequisites.
  6575. * printing version information <1>:     Overall Options.
  6576. * printing version information:         What is GNU Fortran?.
  6577. * problems installing:                  Problems Installing.
  6578. * procedures:                           Procedures.
  6579. * PROGRAM statement:                    Main Program Unit.
  6580. * programs, cc1:                        What is GNU Fortran?.
  6581. * programs, cc1plus:                    What is GNU Fortran?.
  6582. * programs, compiling:                  G77 and GCC.
  6583. * programs, cpp <1>:                    Bug Reporting.
  6584. * programs, cpp <1>:                    What is GNU Fortran?.
  6585. * programs, cpp <1>:                    Overall Options.
  6586. * programs, cpp:                        Preprocessor Options.
  6587. * programs, f771:                       What is GNU Fortran?.
  6588. * programs, speeding up:                Faster Programs.
  6589. * questionable instructions:            What is GNU Fortran?.
  6590. * quick start:                          Quick Start.
  6591. * REAL type:                            Types.
  6592. * recent versions <1>:                  Changes.
  6593. * recent versions:                      News.
  6594. * RECORD statement:                     Missing Features.
  6595. * reporting bugs:                       Bugs.
  6596. * requirements, GNU C:                  General Problems.
  6597. * RETURN statement <1>:                 Functions.
  6598. * RETURN statement:                     Alternate Returns.
  6599. * return type of functions:             Functions.
  6600. * row-major ordering:                   Arrays.
  6601. * run-time library:                     What is GNU Fortran?.
  6602. * run-time options:                     Code Gen Options.
  6603. * SAVE statement:                       Code Gen Options.
  6604. * search path:                          Directory Options.
  6605. * searching for included files:         Directory Options.
  6606. * semicolons:                           Extensions.
  6607. * separate distributions:               Merging Distributions.
  6608. * SHIFT intrinsic:                      Missing Features.
  6609. * side effects:                         Fortran Dialect Options.
  6610. * side effects, order of evaluation:    Non-bugs.
  6611. * SIGNAL() intrinsic:                   Fortran Dialect Options.
  6612. * signature of procedures:              Procedures.
  6613. * slow compiler:                        Large Initialization.
  6614. * source code <1>:                      Case Sensitivity.
  6615. * source code <1>:                      What is GNU Fortran?.
  6616. * source code <1>:                      Unpacking.
  6617. * source code:                          Source Form.
  6618. * source file:                          What is GNU Fortran?.
  6619. * source file form:                     Fortran Dialect Options.
  6620. * source file format <1>:               Fortran Dialect Options.
  6621. * source file format <1>:               Case Sensitivity.
  6622. * source file format:                   Source Form.
  6623. * source form:                          Source Form.
  6624. * source tree:                          Unpacking.
  6625. * speed, compiler:                      Large Initialization.
  6626. * speeding up loops:                    Optimize Options.
  6627. * speeding up programs:                 Faster Programs.
  6628. * standard support:                     Standard Support.
  6629. * statement labels, assigned:           Assigned Statement Labels.
  6630. * statements, ACCEPT:                   Missing Features.
  6631. * statements, ASSIGN:                   Assigned Statement Labels.
  6632. * statements, BLOCK DATA <1>:           Disappointments.
  6633. * statements, BLOCK DATA:               Block Data and Libraries.
  6634. * statements, CLOSE:                    Missing Features.
  6635. * statements, COMMON <1>:               Disappointments.
  6636. * statements, COMMON:                   Common Blocks.
  6637. * statements, DATA:                     Code Gen Options.
  6638. * statements, DIMENSION <1>:            Adjustable Arrays.
  6639. * statements, DIMENSION:                Arrays.
  6640. * statements, DO <1>:                   Loops.
  6641. * statements, DO:                       Warning Options.
  6642. * statements, ENTRY:                    Alternate Entry Points.
  6643. * statements, EQUIVALENCE:              Local Equivalence Areas.
  6644. * statements, FORMAT:                   Missing Features.
  6645. * statements, FUNCTION <1>:             Functions.
  6646. * statements, FUNCTION:                 Procedures.
  6647. * statements, GOTO:                     Assigned Statement Labels.
  6648. * statements, IMPLICIT CHARACTER*(*):   Disappointments.
  6649. * statements, INCLUDE <1>:              Directory Options.
  6650. * statements, INCLUDE <1>:              Preprocessor Options.
  6651. * statements, INCLUDE:                  Bug Reporting.
  6652. * statements, INQUIRE:                  Missing Features.
  6653. * statements, MAP:                      Missing Features.
  6654. * statements, NAMELIST:                 Extensions.
  6655. * statements, OPEN:                     Missing Features.
  6656. * statements, PARAMETER:                Missing Features.
  6657. * statements, POINTER:                  Missing Features.
  6658. * statements, PROGRAM:                  Main Program Unit.
  6659. * statements, RECORD:                   Missing Features.
  6660. * statements, RETURN <1>:               Alternate Returns.
  6661. * statements, RETURN:                   Functions.
  6662. * statements, SAVE:                     Code Gen Options.
  6663. * statements, separated by semicolon:   Extensions.
  6664. * statements, STRUCTURE:                Missing Features.
  6665. * statements, SUBROUTINE <1>:           Procedures.
  6666. * statements, SUBROUTINE:               Alternate Returns.
  6667. * statements, TYPE <1>:                 Dialects.
  6668. * statements, TYPE:                     Missing Features.
  6669. * statements, UNION:                    Missing Features.
  6670. * straight build:                       Straight Build.
  6671. * STRUCTURE statement:                  Missing Features.
  6672. * SUBROUTINE statement <1>:             Procedures.
  6673. * SUBROUTINE statement:                 Alternate Returns.
  6674. * subroutines:                          Alternate Returns.
  6675. * subroutines, intrinsic:               Fortran Dialect Options.
  6676. * suffixes, file name:                  Overall Options.
  6677. * support for gcc versions:             Merging Distributions.
  6678. * support for ANSI FORTRAN 77:          Standard Support.
  6679. * support, gdb:                         But-bugs.
  6680. * support, f77:                         Non-bugs.
  6681. * support, Fortran 90:                  Missing Features.
  6682. * suppressing warnings:                 Warning Options.
  6683. * symbol names <1>:                     Names.
  6684. * symbol names:                         Fortran Dialect Options.
  6685. * symbol names, transforming:           Code Gen Options.
  6686. * symbol names, underscores:            Code Gen Options.
  6687. * syntax checking:                      Warning Options.
  6688. * SYSTEM() intrinsic:                   Fortran Dialect Options.
  6689. * tab characters:                       Source Form.
  6690. * texinfo:                              Updating Documentation.
  6691. * trailing null byte:                   Character and Hollerith Constants.
  6692. * transformation of symbol names:       Names.
  6693. * transforming symbol names:            Code Gen Options.
  6694. * translation of user programs:         What is GNU Fortran?.
  6695. * trips, number of:                     Loops.
  6696. * TYPE statement <1>:                   Missing Features.
  6697. * TYPE statement:                       Dialects.
  6698. * typeless constants:                   Changes.
  6699. * types, COMPLEX:                       Types.
  6700. * types, constants:                     Constants.
  6701. * types, DOUBLE COMPLEX:                Types.
  6702. * types, DOUBLE PRECISION:              Types.
  6703. * types, file:                          Overall Options.
  6704. * types, INTEGER:                       Types.
  6705. * types, LOGICAL:                       Types.
  6706. * types, of data:                       Types.
  6707. * types, REAL:                          Types.
  6708. * ugly features <1>:                    Distensions.
  6709. * ugly features:                        Warning Options.
  6710. * undefined behavior:                   Bug Criteria.
  6711. * undefined function value:             Bug Criteria.
  6712. * undefined reference (_main):          But-bugs.
  6713. * undefined reference (_strtoul):       General Problems.
  6714. * underscores:                          Code Gen Options.
  6715. * uninitialized variables <1>:          Warning Options.
  6716. * uninitialized variables:              Code Gen Options.
  6717. * UNION statement:                      Missing Features.
  6718. * UNIX intrinsics:                      Fortran Dialect Options.
  6719. * unpacking distributions:              Unpacking.
  6720. * unrecognized file format:             What is GNU Fortran?.
  6721. * unresolved reference (various):       But-bugs.
  6722. * unrolling loops:                      Optimize Options.
  6723. * unsupported warnings:                 Warning Options.
  6724. * unused arguments:                     Warning Options.
  6725. * unused dummies:                       Warning Options.
  6726. * unused parameters:                    Warning Options.
  6727. * unused variables:                     Warning Options.
  6728. * updating info directory:              Updating Documentation.
  6729. * uppercase letters:                    Case Sensitivity.
  6730. * user-visible changes:                 Changes.
  6731. * variables, initialization of:         Code Gen Options.
  6732. * variables, uninitialized <1>:         Warning Options.
  6733. * variables, uninitialized:             Code Gen Options.
  6734. * variables, unused:                    Warning Options.
  6735. * version information, printing <1>:    What is GNU Fortran?.
  6736. * version information, printing:        Overall Options.
  6737. * versions of gcc:                      Merging Distributions.
  6738. * versions, recent <1>:                 Changes.
  6739. * versions, recent:                     News.
  6740. * VXT extensions:                       Dialects.
  6741. * VXT features <1>:                     Dialects.
  6742. * VXT features:                         Fortran Dialect Options.
  6743. * VXT intrinsics:                       Fortran Dialect Options.
  6744. * warning messages:                     Warning Options.
  6745. * warnings:                             What is GNU Fortran?.
  6746. * warnings vs errors:                   Warnings and Errors.
  6747. * warnings, all:                        Warning Options.
  6748. * warnings, extra:                      Warning Options.
  6749. * warnings, implicit declaration:       Warning Options.
  6750. * warnings, unsupported:                Warning Options.
  6751. * why separate distributions:           Merging Distributions.
  6752. * wisdom:                               Collected Fortran Wisdom.
  6753. * writing code:                         Collected Fortran Wisdom.
  6754. * zero byte, trailing:                  Character and Hollerith Constants.
  6755. * _strtoul:                             General Problems.
  6756. Tag Table:
  6757. Node: Top
  6758. Node: Copying
  6759. Node: Contributors
  6760. 22331
  6761. Node: Funding
  6762. 25183
  6763. Node: Funding GNU Fortran
  6764. 27701
  6765. Node: Look and Feel
  6766. 30520
  6767. Node: Getting Started
  6768. 31037
  6769. Node: What is GNU Fortran?
  6770. 33370
  6771. Node: G77 and GCC
  6772. 42922
  6773. Node: Invoking G77
  6774. 44288
  6775. Node: Option Summary
  6776. 46377
  6777. Node: Overall Options
  6778. 50422
  6779. Node: Fortran Dialect Options
  6780. 53759
  6781. Node: Warning Options
  6782. 61505
  6783. Node: Debugging Options
  6784. 70141
  6785. Node: Optimize Options
  6786. 70989
  6787. Node: Preprocessor Options
  6788. 73251
  6789. Node: Directory Options
  6790. 74001
  6791. Node: Code Gen Options
  6792. 75250
  6793. Node: Environment Variables
  6794. 82351
  6795. Node: News
  6796. 82824
  6797. Node: Changes
  6798. 107364
  6799. Node: Language
  6800. 113636
  6801. Node: Standard Support
  6802. 115169
  6803. Node: Extensions
  6804. 117580
  6805. Node: Types
  6806. 120540
  6807. Node: Constants
  6808. 125025
  6809. Node: Source Form
  6810. 126194
  6811. Node: Pedantic Compilation
  6812. 130041
  6813. Node: Case Sensitivity
  6814. 133433
  6815. Node: Intrinsics
  6816. 142015
  6817. Node: Dialects
  6818. 145294
  6819. Node: Object Compatibility
  6820. 146954
  6821. Node: Dropping f2c Compatibility
  6822. 149280
  6823. Node: Other Compilers
  6824. 152061
  6825. Node: Distensions
  6826. 153848
  6827. Node: Installation
  6828. 156193
  6829. Node: Prerequisites
  6830. 157346
  6831. Node: Problems Installing
  6832. 161898
  6833. Node: General Problems
  6834. 162542
  6835. Node: Cross-compiler Problems
  6836. 165629
  6837. Node: Quick Start
  6838. 167661
  6839. Node: Complete Installation
  6840. 175650
  6841. Node: Unpacking
  6842. 176245
  6843. Node: Merging Distributions
  6844. 179359
  6845. Node: Installing f77
  6846. 184604
  6847. Node: Installing f2c
  6848. 185964
  6849. Node: Patching GNU Fortran
  6850. 188904
  6851. Node: Where to Install
  6852. 190154
  6853. Node: Configuring gcc
  6854. 193405
  6855. Node: Building gcc
  6856. 195192
  6857. Node: Bootstrap Build
  6858. 197214
  6859. Node: Straight Build
  6860. 199137
  6861. Node: Pre-installation Checks
  6862. 200541
  6863. Node: Installation of Binaries
  6864. 203765
  6865. Node: Updating Documentation
  6866. 205125
  6867. Node: Missing bison?
  6868. 205961
  6869. Node: Missing makeinfo?
  6870. 207328
  6871. Node: Distributing Binaries
  6872. 207868
  6873. Node: Settings
  6874. 213578
  6875. Node: Maximum Stackable Size
  6876. 214425
  6877. Node: Floating-point Bit Patterns
  6878. 215006
  6879. Node: Large Initialization
  6880. 215767
  6881. Node: Alpha Problems
  6882. 217364
  6883. Node: Debugging and Interfacing
  6884. 218443
  6885. Node: Names
  6886. 221016
  6887. Node: Main Program Unit
  6888. 224077
  6889. Node: Arrays
  6890. 226434
  6891. Node: Procedures
  6892. 229776
  6893. Node: Adjustable Arrays
  6894. 232152
  6895. Node: Alternate Returns
  6896. 235025
  6897. Node: Functions
  6898. 235912
  6899. Node: Common Blocks
  6900. 237547
  6901. Node: Local Equivalence Areas
  6902. 238722
  6903. Node: Alternate Entry Points
  6904. 240241
  6905. Node: Assigned Statement Labels
  6906. 247022
  6907. Node: Collected Fortran Wisdom
  6908. 248876
  6909. Node: Overly Convenient Options
  6910. 250327
  6911. Node: Block Data and Libraries
  6912. 253327
  6913. Node: Faster Programs
  6914. 255741
  6915. Node: Working Programs
  6916. 257364
  6917. Node: Loops
  6918. 260047
  6919. Node: Advantages Over f2c
  6920. 265266
  6921. Node: Language Extensions
  6922. 266171
  6923. Node: Compiler Options
  6924. 266693
  6925. Node: Compiler Speed
  6926. 267160
  6927. Node: Program Speed
  6928. 267884
  6929. Node: Ease of Debugging
  6930. 269182
  6931. Node: Character and Hollerith Constants
  6932. 271635
  6933. Node: Trouble
  6934. 272444
  6935. Node: But-bugs
  6936. 273911
  6937. Node: GPC Bugs
  6938. 279044
  6939. Node: Missing Features
  6940. 283336
  6941. Node: Disappointments
  6942. 297381
  6943. Node: Non-bugs
  6944. 299795
  6945. Node: Warnings and Errors
  6946. 311379
  6947. Node: Open Questions
  6948. 313078
  6949. Node: Bugs
  6950. 314381
  6951. Node: Bug Criteria
  6952. 315786
  6953. Node: Bug Lists
  6954. 318047
  6955. Node: Bug Reporting
  6956. 318832
  6957. Node: Sending Patches
  6958. 332259
  6959. Node: Service
  6960. 337756
  6961. Node: Index
  6962. 338230
  6963. End Tag Table
  6964.